From 0b961f14d5ace18197d87b3d268b4eb40cf38b35 Mon Sep 17 00:00:00 2001 From: Alex Hancock Date: Thu, 23 Apr 2026 11:52:09 -0400 Subject: [PATCH] tui: do not build goose if connecting to a server (#8779) --- ui/text/scripts/dev-start.mjs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ui/text/scripts/dev-start.mjs b/ui/text/scripts/dev-start.mjs index 8f836628..58d7e6e7 100644 --- a/ui/text/scripts/dev-start.mjs +++ b/ui/text/scripts/dev-start.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node -// Development entrypoint: ensures a goose binary is available, then launches -// the TUI via tsx. Skips the cargo build if GOOSE_BINARY is already set. +// Development entrypoint: ensures a goose binary is available, then launches the TUI +// Skips the cargo build if GOOSE_BINARY is already set or if --server is provided import { execFileSync } from "node:child_process"; import { existsSync } from "node:fs"; @@ -10,8 +10,16 @@ import { fileURLToPath } from "node:url"; const __dirname = dirname(fileURLToPath(import.meta.url)); const repoRoot = join(__dirname, "..", "..", ".."); +const args = process.argv.slice(2); +const hasServerFlag = args.some( + (arg) => + arg === "--server" || + arg === "-s" || + arg.startsWith("--server=") || + arg.startsWith("-s="), +); -if (!process.env.GOOSE_BINARY) { +if (!hasServerFlag && !process.env.GOOSE_BINARY) { const binName = process.platform === "win32" ? "goose.exe" : "goose"; const binaryPath = join(repoRoot, "target", "debug", binName);