Replace spaces with %20 in path names

If there are strings in the path name, the sbt-script argument will be
interpreted as multiple arguments. The thin client also needs to be
updated to handle %20 in path names.
This commit is contained in:
Ethan Atkins 2020-10-25 18:59:53 -07:00
parent 9ffddfbd25
commit 19dc8d1bfd
2 changed files with 6 additions and 2 deletions

View File

@ -621,7 +621,9 @@ runNativeClient() {
unset 'original_args[i]'
fi
done
execRunner "$sbtn_command" "--sbt-script=$0" "${original_args[@]}"
sbt_script=$0
sbt_script=${sbt_script/ /%20}
execRunner "$sbtn_command" "--sbt-script=$sbt_script" "${original_args[@]}"
}
original_args=("$@")

View File

@ -646,7 +646,9 @@ if defined sbt_args_verbose (
if not "%~1" == "" ( call :echolist %* )
set "SBT_ARGS=-v !SBT_ARGS!"
)
set "SBT_ARGS=--sbt-script=!SBT_BIN_DIR!sbt.bat %SBT_ARGS%"
set "SBT_SCRIPT=!SBT_BIN_DIR: =%%20!sbt.bat"
set "SBT_ARGS=--sbt-script=!SBT_SCRIPT! %SBT_ARGS%"
rem Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) is required
rem https://www.microsoft.com/en-us/download/details.aspx?id=13523