Skip to content

sbt --version doesn't work on sbt 2.x project directories #8717

@eed3si9n

Description

@eed3si9n

This is a variant of #8711

Steps

  1. Make a sbt 2.x project.
    1. cd /tmp
    2. mkdir hello
    3. cd hello
    4. touch build.sbt
    5. mkdir project
    6. echo "sbt.version=2.0.0-RC8" > project/build.properties
  2. $ $HOME/work/sbt/sbt --version -v

Problem

It runs sbtn instead of printing out the script version:

$ $HOME/work/sbt/sbt --version -v
....
[debug] running native client
# Executing command line:
/Users/xxx/.cache/sbt/boot/sbtn/1.12.1/sbtn
--sbt-script=/Users/xxx/work/sbt/sbt
--script-version
-v

[info] server was not detected. starting an instance
[error] failed to connect to server

Expectation

$ $HOME/work/sbt-modules/sbt/sbt --version -v
[sbt_options] declare -a sbt_options=([0]="-Xms2048M" [1]="-Xmx2048M" [2]="-Xss2M")
[process_args] java_version = '17'
sbt version in this project: 2.0.0-something
sbt runner version: _to_be_replaced

[info] sbt runner (sbt-the-shell-script) is a runner to run any declared version of sbt.
[info] Actual version of the sbt is declared using project/build.properties for each build.

Print out the sbt version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugarea/runner-scriptissues around sbt-the-bash-script, or bat script

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions