Skip to content

Commit 9386542

Browse files
robi-wanjosevalim
authored andcommitted
Support path with spaces as argument to elixir.bat (#6596)
Erlang parameters (CLI switch '--erl') are used with possible quotes around the argument removed ('%~1'). This causes an error if one arbitrary argument to elixir.bat represents a quoted path with spaces in it: "[part of path after space] was unexpected at this time." Enclose the complete expression with quotes to work around this (the quotes are not added to the content). This behavior is not documented in the [Windows XP Command Line Reference for SET](https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/set.mspx) but there are other places which document the [SET command](https://ss64.com/nt/set.html). Fix for #6455
1 parent 4bfbed2 commit 9386542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/elixir.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if """"=="%par:--sname=%" (set parsErlang=%parsErlang% -sname %1 &
8888
if """"=="%par:--name=%" (set parsErlang=%parsErlang% -name %1 && shift)
8989
if """"=="%par:--logger-otp-reports=%" (set parsErlang=%parsErlang% -logger handle_otp_reports %1 && shift)
9090
if """"=="%par:--logger-sasl-reports=%" (set parsErlang=%parsErlang% -logger handle_sasl_reports %1 && shift)
91-
if """"=="%par:--erl=%" (set beforeExtra=%beforeExtra% %~1 && shift)
91+
if """"=="%par:--erl=%" (set "beforeExtra=%beforeExtra% %~1" && shift)
9292
goto:startloop
9393

9494
rem ******* assume all pre-params are parsed ********************

0 commit comments

Comments
 (0)