-
Notifications
You must be signed in to change notification settings - Fork 1k
sbt new fails to parse arguments correctly on Windows #7507
Description
steps
Replicated on sbt 1.9.9, running Windows Terminal (PowerShell).
- Open command line on Windows
- Run
sbt new foundweekends/giter8.g8 --name=example.g8 --giter8_version=0.16.2 --sbt_version=1.9.9
problem
Command does not run successfully, error is throw:
Error: Unknown option --name
Error: Unknown argument 'example.g8'
Error: Unknown option --giter8_version
Error: Unknown argument '0.16.2'
Error: Unknown option --sbt_version
Error: Unknown argument '1.9.8'
Try --help for more information.
Command does work on Linux, tested on WSL (Ubuntu).
expectation
sbt project should be created from the template successfully with arguments passed to the template.
notes
After experimenting with variations of command, one version I found to work was sbt new foundweekends/giter8.g8 "--name=example.g8 " "--giter8_version=0.16.2 " "--sbt_version=1.9.9 " - arguments must be enclosed in quotes and must be terminated by a space.
One strange variation was that enclosing all arguments in quotes - sbt new foundweekends/giter8.g8 "--name=example.g8 --giter8_version=0.16.2 --sbt_version=1.9.9" - created the sbt project, but with only the name argument set to example.g8 --giter8_version=0.16.2 --sbt_version=1.9.9, meaning that sbt project's directory would end up containing the remaining part of argument string.
This does not seem intentional, likely a bug in parser module.