From 271fda3d66b254fce8899b09ee18466a18daec36 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 22 Feb 2022 23:39:26 +0100 Subject: [PATCH] fix(windows): deal with space in install path --- bin/emqx.cmd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/emqx.cmd b/bin/emqx.cmd index 236324e85..0e418f782 100644 --- a/bin/emqx.cmd +++ b/bin/emqx.cmd @@ -36,6 +36,12 @@ set rel_root_dir=%%~fA ) +:: If release dir has space, change dir +@if not "%rel_root_dir%"=="%rel_root_dir: =%" ( + @chdir /d "%rel_root_dir%" + @set rel_root_dir=. +) + @set "erts_dir=%rel_root_dir%\erts-%erts_vsn%" @set "rootdir=%rel_root_dir%" @set "rel_dir=%rel_root_dir%\releases\%rel_vsn%"