fix(windows): start console mode in erl but not werl

otherwise there is no way to debug a boot
This commit is contained in:
Zaiming (Stone) Shi 2022-04-21 12:26:10 +02:00
parent 0e1c491a47
commit 6b0f56d4d6
1 changed files with 6 additions and 4 deletions

View File

@ -24,7 +24,7 @@
@set script=%~n0 @set script=%~n0
:: for remote_console :: for attach and remote_console
@set EPMD_ARG=-start_epmd false -epmd_module ekka_epmd -proto_dist ekka @set EPMD_ARG=-start_epmd false -epmd_module ekka_epmd -proto_dist ekka
:: for erl command :: for erl command
@set ERL_FLAGS=%EPMD_ARG% @set ERL_FLAGS=%EPMD_ARG%
@ -65,6 +65,9 @@
@set HOCON_ENV_OVERRIDE_PREFIX=EMQX_ @set HOCON_ENV_OVERRIDE_PREFIX=EMQX_
@set node_type=-name @set node_type=-name
@set schema_mod=emqx_conf_schema @set schema_mod=emqx_conf_schema
:: no advanced DB backend for Windows
@set EMQX_DB__BACKEND=mnesia
@set EMQX_DB__ROLE=core
@set conf_path="%etc_dir%\emqx.conf" @set conf_path="%etc_dir%\emqx.conf"
:: Extract node name from emqx.conf :: Extract node name from emqx.conf
@ -212,8 +215,7 @@ cd /d "%rel_root_dir%"
@echo off @echo off
cd /d %rel_root_dir% cd /d %rel_root_dir%
@echo on @echo on
@start "%rel_name% console" %werl% -mode embedded -boot "%boot_file_name%" %args% %erl_exe% -mode embedded -boot "%boot_file_name%" %args%
@echo emqx is started!
@goto :eof @goto :eof
:: Ping the running node :: Ping the running node
@ -234,7 +236,7 @@ cd /d %rel_root_dir%
:: Attach to a running node :: Attach to a running node
:attach :attach
@start "remsh_%nodename%" %werl% -hidden -remsh "%node_name%" -boot "%clean_boot_file_name%" "%node_type%" "remsh_%node_name%" -setcookie "%node_cookie%" %erl_exe% -hidden -remsh "%node_name%" -boot "%clean_boot_file_name%" "%node_type%" "remsh_%node_name%" -setcookie "%node_cookie%"
@goto :eof @goto :eof
:: Trim variable :: Trim variable