Skip to content

sbt --script-version asks to continue (on alpine) #7942

@francisdb

Description

@francisdb

Found this issue while working on sbt/docker-sbt#313

steps

sbt  --script-version

or

sbt  --version

problem

[warn] Neither build.sbt nor a 'project' directory in the current directory: /root
c) continue
q) quit

expectation

I would expect this to not request input, or at least have a flag to continue

notes

The bash version does not ignore the --script-version command

sbt/sbt

Lines 624 to 625 in f61100f

[[ -f ./build.sbt || -d ./project || -n "$sbt_create" || -n "$sbt_new" ]] || {
echo "[warn] Neither build.sbt nor a 'project' directory in the current directory: $(pwd)"

The bat version does ignore the version

if not defined sbt_args_sbt_create if not defined sbt_args_print_version if not defined sbt_args_print_sbt_version if not defined sbt_args_print_sbt_script_version if not defined shutdownall if not exist build.sbt (
if not exist project\ (
if not defined sbt_new (
echo [warn] Neither build.sbt nor a 'project' directory in the current directory: "%CD%"

Strangely I can't reproduce this on macOS without calling bash directly?

➜  test bash /Users/me/.sdkman/candidates/sbt/current/bin/sbt --script-version
1.10.1
➜  test bash sbt --script-version
[warn] Neither build.sbt nor a 'project' directory in the current directory: /Users/me/test
c) continue
q) quit

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions