diff --git a/launcher-package/src/universal/bin/sbt.bat b/launcher-package/src/universal/bin/sbt.bat index 2bd4dd49e..3de1fbd88 100755 --- a/launcher-package/src/universal/bin/sbt.bat +++ b/launcher-package/src/universal/bin/sbt.bat @@ -476,6 +476,11 @@ if "%~0" == "new" ( set sbt_new=true ) ) +if "%~0" == "init" ( + if not defined SBT_ARGS ( + set sbt_new=true + ) +) if "%g:~0,2%" == "-D" ( rem special handling for -D since '=' gets parsed away diff --git a/sbt b/sbt index 9a7c36aa5..e414ad7bb 100755 --- a/sbt +++ b/sbt @@ -639,7 +639,7 @@ process_my_args () { -allow-empty|--allow-empty|-sbt-create|--sbt-create) allow_empty=true && shift ;; - new) sbt_new=true && addResidual "$1" && shift ;; + new|init) sbt_new=true && addResidual "$1" && shift ;; *) addResidual "$1" && shift ;; esac