Skip to content

Commit 8c7af15

Browse files
committed
Daemon - improve path handling on Windows
1 parent b4cbfff commit 8c7af15

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

app/server/ruby/bin/daemon.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -976,15 +976,19 @@ def initialize(ports, kill_switch, token)
976976
ENV["RELEASE_SYS_CONFIG"] = "#{Paths.tau_release_sys_config_path}"
977977
ENV["RELEASE_ROOT"] = "#{Paths.tau_release_root}"
978978

979-
cmd = "#{Paths.tau_release_erl_bin_path}".gsub('/', '\\')
980-
args = ["-config", "#{Paths.tau_release_sys_path}".gsub('/', "\\"),
981-
"-boot", "#{Paths.tau_release_start_path}".gsub('/', "\\"),
982-
"-boot_var", "RELEASE_LIB", "#{Paths.tau_release_lib_path}".gsub('/', "\\"),
983-
"-args_file", "#{Paths.tau_release_vm_args_path}".gsub('/', "\\"),
979+
cmd = File.expand_path(Paths.tau_release_erl_bin_path)
980+
981+
args = ["-config", "\"#{File.expand_path(Paths.tau_release_sys_path)}\"",
982+
"-boot", "\"#{File.expand_path(Paths.tau_release_start_path)}\"",
983+
"-boot_var", "RELEASE_LIB", "\"#{File.expand_path(Paths.tau_release_lib_path)}\"",
984+
"-args_file", "\"#{File.expand_path(Paths.tau_release_vm_args_path)}\"",
984985
"-noshell",
985986
"-s", "elixir", "start_cli",
986987
"-mode", "embedded",
987988
"-extra", "--no-halt"]
989+
990+
Util.log "Windows Tau boot command: #{cmd}"
991+
Util.log "Windows Tau boot args: #{args.inspect}"
988992
else
989993
cmd = Paths.tau_boot_path
990994
args = []
@@ -1571,4 +1575,4 @@ def find_free_port
15711575
SonicPi::Daemon::Util.log_error(e)
15721576
else
15731577
SonicPi::Daemon::Util.log "Daemon Finished. Cheerio."
1574-
end
1578+
end

0 commit comments

Comments
 (0)