@@ -968,13 +968,21 @@ def initialize(ports, kill_switch, token)
968
968
ENV [ "TAU_ENV" ] = "#{ ENV [ "SONIC_PI_ENV" ] || unified_opts [ :env ] || "prod" } "
969
969
ENV [ "MIX_ENV" ] = ENV [ "TAU_ENV" ]
970
970
ENV [ "TAU_PHX_PORT" ] = "#{ @phx_port } "
971
- ENV [ "TAU_LOG_PATH" ] = "#{ Paths . tau_log_path } "
972
- ENV [ "TAU_BOOT_LOG_PATH" ] = "#{ Paths . tau_boot_log_path } "
971
+
972
+ if Util . os == :windows
973
+ ENV [ "TAU_LOG_PATH" ] = File . expand_path ( Paths . tau_log_path ) . gsub ( '/' , '\\' )
974
+ ENV [ "TAU_BOOT_LOG_PATH" ] = File . expand_path ( Paths . tau_boot_log_path ) . gsub ( '/' , '\\' )
975
+ else
976
+ ENV [ "TAU_LOG_PATH" ] = "#{ Paths . tau_log_path } "
977
+ ENV [ "TAU_BOOT_LOG_PATH" ] = "#{ Paths . tau_boot_log_path } "
978
+ end
973
979
974
980
if Util . os == :windows
975
981
if ENV [ "TAU_ENV" ] == "prod"
976
- ENV [ "RELEASE_SYS_CONFIG" ] = "#{ Paths . tau_release_sys_config_path } "
977
- ENV [ "RELEASE_ROOT" ] = "#{ Paths . tau_release_root } "
982
+ ENV [ "RELEASE_SYS_CONFIG" ] = File . expand_path ( Paths . tau_release_sys_config_path ) . gsub ( '/' , '\\' )
983
+ ENV [ "RELEASE_ROOT" ] = File . expand_path ( Paths . tau_release_root ) . gsub ( '/' , '\\' )
984
+ ENV [ "TAU_LOG_PATH" ] = File . expand_path ( Paths . tau_log_path ) . gsub ( '/' , '\\' )
985
+ ENV [ "TAU_BOOT_LOG_PATH" ] = File . expand_path ( Paths . tau_boot_log_path ) . gsub ( '/' , '\\' )
978
986
979
987
cmd = File . expand_path ( Paths . tau_release_erl_bin_path )
980
988
@@ -998,7 +1006,21 @@ def initialize(ports, kill_switch, token)
998
1006
args = [ Paths . tau_boot_path ]
999
1007
end
1000
1008
1009
+ # Start without internal log recording
1001
1010
super ( cmd , args , Paths . tau_boot_log_path )
1011
+
1012
+ enable_internal_log_recording!
1013
+
1014
+
1015
+ sleep 2
1016
+ # Check if process exited immediately
1017
+ unless process_running?
1018
+ Util . log "Tau process exited immediately. Exit status: #{ @wait_thr . value . exitstatus if @wait_thr } "
1019
+ Util . log "Tau output: #{ @log } " if @log && !@log . empty?
1020
+ raise "Tau failed to start - process exited immediately"
1021
+ end
1022
+
1023
+ disable_internal_log_recording!
1002
1024
end
1003
1025
1004
1026
def restart!
0 commit comments