From e6db85d93d433b97d6923d753b6672d2ac235b3d Mon Sep 17 00:00:00 2001 From: robi-wan Date: Sat, 23 Sep 2017 22:52:21 +0200 Subject: [PATCH] Support path with spaces as argument to elixir.bat 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 --- bin/elixir.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/elixir.bat b/bin/elixir.bat index 89c7d2c47ce..6d7e00e4705 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 ********************