From 83e5bf175b165f0fbf7becb09d23210b9097ebd2 Mon Sep 17 00:00:00 2001 From: Tyler Hughes Date: Thu, 10 Jan 2019 01:39:52 +0000 Subject: [PATCH] [windows] Added support for paths containing spaces --- priv/libexec/commands/win/console.ps1 | 6 +++--- priv/templates/release_rc_win_exec.eex | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/priv/libexec/commands/win/console.ps1 b/priv/libexec/commands/win/console.ps1 index 1b21c16a..f44d607e 100644 --- a/priv/libexec/commands/win/console.ps1 +++ b/priv/libexec/commands/win/console.ps1 @@ -4,9 +4,9 @@ $erl = (join-path $bin "erl.exe") #get erl.exe as werl.exe will open a new windo $boot = (join-path $Env:REL_DIR $Env:REL_NAME) -$argv = @("-boot", $boot) -$argv += @("-config", $Env:SYS_CONFIG_PATH) -$argv += @("-args_file", $Env:VMARGS_PATH) +$argv = @("-boot", "`"$boot`"") +$argv += @("-config", "`"$Env:SYS_CONFIG_PATH`"") +$argv += @("-args_file", "`"$Env:VMARGS_PATH`"") $argv += @("-user", "Elixir.IEx.CLI") $argv += @("-extra", "--no-halt", "+iex") diff --git a/priv/templates/release_rc_win_exec.eex b/priv/templates/release_rc_win_exec.eex index 07882f0d..a9c49e27 100644 --- a/priv/templates/release_rc_win_exec.eex +++ b/priv/templates/release_rc_win_exec.eex @@ -15,4 +15,5 @@ where pwsh >nul 2>nul if %ERRORLEVEL% equ 0 ( set prog=pwsh ) -%prog% -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command "& "%boot_script%" @args" %* +%prog% -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command "& '%boot_script%' @args" %* +