fix(bun-install): default outputMode to "pipe" to prevent TUI stdout leak

runBunInstallWithDetails() defaulted to outputMode:"inherit", causing
bun install stdout/stderr to leak into the TUI when callers omitted the
option. Changed default to "pipe" so output is captured silently.

Also fixed stale mock in background-update-check.test.ts: the test was
mocking runBunInstall (unused) instead of runBunInstallWithDetails, and
returning boolean instead of BunInstallResult.
This commit is contained in:
YeonGyu-Kim
2026-03-12 17:28:51 +09:00
parent 81301a6071
commit ca7c0e391e
3 changed files with 41 additions and 24 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ function logCapturedOutputOnFailure(outputMode: BunInstallOutputMode, output: Bu
}
export async function runBunInstallWithDetails(options?: RunBunInstallOptions): Promise<BunInstallResult> {
const outputMode = options?.outputMode ?? "inherit"
const outputMode = options?.outputMode ?? "pipe"
const cacheDir = getOpenCodeCacheDir()
const packageJsonPath = `${cacheDir}/package.json`