Skip to content

Commit

Permalink
Fix when scala3 build.
Browse files Browse the repository at this point in the history
- rename tput
- remove -nocompdaemon option
- fix output version script
  • Loading branch information
kijuky committed Aug 6, 2022
1 parent cc1d2bb commit 1c53138
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions amazon-corretto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ RUN \
chmod -R 755 /usr/share/scala && \
ln -s /usr/share/scala/bin/* /usr/local/bin && \
case $SCALA_VERSION in \
"3"*) echo "@main def main = println(util.Properties.versionMsg)" > test.scala ;; \
*) echo "println(util.Properties.versionMsg)" > test.scala ;; \
esac && \
scala -nocompdaemon test.scala && rm test.scala
"3"*) \
echo '@main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")' > test.scala && \
# WORKAROUND: tput: terminal attributes: No such device or address
mv /usr/bin/tput /usr/bin/_tput && \
scala test.scala && rm test.scala && \
mv /usr/bin/_tput /usr/bin/tput ;; \
*) \
echo "println(util.Properties.versionMsg)" > test.scala && \
scala -nocompdaemon test.scala && rm test.scala ;; \
esac

# Symlink java to have it available on sbtuser's PATH
RUN ln -s /opt/java/openjdk/bin/java /usr/local/bin/java
Expand Down

0 comments on commit 1c53138

Please sign in to comment.