VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
541 stars 128 forks source link

scala-cli-action always install Java, even if JAVA_HOME is defined #3013

Open adamw opened 1 month ago

adamw commented 1 month ago

The action shouldn't install Java if one is already installed, but this doesn't happen. That's probably because the default value for jvm is temurin:17, so that's always installed, unless the option is overriden.

image

The work-around is to provide an empty value for jvm:

    - name: Install scala-cli
      uses: VirtusLab/scala-cli-setup@main
      with:
        jvm: ''
adamw commented 1 month ago

Btw., the image above corresponds to the following config:

    - name: Install scala-cli
      uses: VirtusLab/scala-cli-setup@main