summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrobi-wan <robi-wan@users.noreply.github.com>2017-09-24 12:07:19 +0200
committerJosé Valim <jose.valim@gmail.com>2017-09-24 12:07:19 +0200
commit48b41f422a64403ac5a3fed77bd560109cb98cd1 (patch)
tree6f5bcef71e1b329720e8280d58ecfe999e5b5d82 /bin
parentfc71b3b5ada6b90c8c73929fda39dad3b4b68886 (diff)
downloadelixir-48b41f422a64403ac5a3fed77bd560109cb98cd1.tar.gz
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
Diffstat (limited to 'bin')
-rw-r--r--bin/elixir.bat2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/elixir.bat b/bin/elixir.bat
index 89c7d2c47..6d7e00e47 100644
--- a/bin/elixir.bat
+++ b/bin/elixir.bat
@@ -88,7 +88,7 @@ if """"=="%par:--sname=%" (set parsErlang=%parsErlang% -sname %1 &
if """"=="%par:--name=%" (set parsErlang=%parsErlang% -name %1 && shift)
if """"=="%par:--logger-otp-reports=%" (set parsErlang=%parsErlang% -logger handle_otp_reports %1 && shift)
if """"=="%par:--logger-sasl-reports=%" (set parsErlang=%parsErlang% -logger handle_sasl_reports %1 && shift)
-if """"=="%par:--erl=%" (set beforeExtra=%beforeExtra% %~1 && shift)
+if """"=="%par:--erl=%" (set "beforeExtra=%beforeExtra% %~1" && shift)
goto:startloop
rem ******* assume all pre-params are parsed ********************