From f99e29ccdfaa66389345cdd0534fa937fbde0947 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 25 Sep 2025 12:01:45 -0400 Subject: [PATCH] fix(cmd): start detached server with the correct host --- internal/cmd/root.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 569b260ddc603148e8aa3d00123392f2dc2f06e2..59e63632384150ca08bfeb6c73978ce9c3a4e20b 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -254,7 +254,12 @@ func startDetachedServer(cmd *cobra.Command) error { return fmt.Errorf("failed to create server working directory: %v", err) } - c := exec.CommandContext(cmd.Context(), exe, "server") + args := []string{"server"} + if clientHost != server.DefaultHost() { + args = append(args, "--host", clientHost) + } + + c := exec.CommandContext(cmd.Context(), exe, args...) stdoutPath := filepath.Join(chDir, "stdout.log") stderrPath := filepath.Join(chDir, "stderr.log") detachProcess(c)