fix(daemon): pass global --tcp to daemon start

DaemonCommands::Start had its own --tcp subcommand flag, so
'wx --tcp=ADDR daemon start' ignored the global --tcp and
started the daemon with no TCP listener. Now the global --tcp
is used as fallback when the subcommand flag is absent.
pull/43/head
David Li 2026-05-13 18:23:43 +08:00
parent cba33e4630
commit 1be706ddb0
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ pub fn cmd_daemon(cmd: DaemonCommands, tcp_addr: Option<&str>) -> Result<()> {
DaemonCommands::Status => cmd_status(tcp_addr),
DaemonCommands::Stop => cmd_stop(tcp_addr),
DaemonCommands::Logs { follow, lines } => cmd_logs(follow, lines),
DaemonCommands::Start { tcp } => crate::daemon::run_start(tcp),
DaemonCommands::Start { tcp } => crate::daemon::run_start(tcp.or_else(|| tcp_addr.map(String::from))),
}
}