summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-env.bat
diff options
context:
space:
mode:
authorThomas Speckert <60146803+twjs76@users.noreply.github.com>2020-06-08 15:42:03 +0200
committerThomas Speckert <60146803+twjs76@users.noreply.github.com>2020-06-08 15:42:03 +0200
commit7de370fefab77a28caeccdbfde629ccccc51932c (patch)
treec510245226fa3f8b9f1187ce0eb84bca3a5d4f95 /scripts/rabbitmq-env.bat
parent90825a5ca8d8b67019e2331041f2c86431a8f8b0 (diff)
downloadrabbitmq-server-git-7de370fefab77a28caeccdbfde629ccccc51932c.tar.gz
Support RABBITMQ_HOME paths containing brackets on windows
If the environment variable RABBITMQ_HOME contained a path with either '(' or ')' (for example, a path under C:\Program Files (x86)\), then the script would unexpectedly exit with the error '\some\path was unexpected at this time'. This was caused by the parenthesis being interpreted as part of the batch 'if/else'. Adding quotes around the arguments to the SET command fixes the problem.
Diffstat (limited to 'scripts/rabbitmq-env.bat')
-rw-r--r--scripts/rabbitmq-env.bat4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/rabbitmq-env.bat b/scripts/rabbitmq-env.bat
index a8717070f2..a326ca802a 100644
--- a/scripts/rabbitmq-env.bat
+++ b/scripts/rabbitmq-env.bat
@@ -15,9 +15,9 @@ set SCRIPT_NAME=%1
for /f "delims=" %%F in ("%SCRIPT_DIR%..") do set RABBITMQ_HOME=%%~dpF%%~nF%%~xF
if defined ERL_LIBS (
- set ERL_LIBS=%RABBITMQ_HOME%\plugins;%ERL_LIBS%
+ set "ERL_LIBS=%RABBITMQ_HOME%\plugins;%ERL_LIBS%"
) else (
- set ERL_LIBS=%RABBITMQ_HOME%\plugins
+ set "ERL_LIBS=%RABBITMQ_HOME%\plugins"
)
REM If ERLANG_HOME is not defined, check if "erl.exe" is available in