Skip to content

Commit 82801f0

Browse files
committed
Fix env stripping in CLI authless launcher
1 parent c945118 commit 82801f0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cli/src/__tests__/e2e/cli-ui.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ async function launchCLIWithoutAuth(options: {
8484
}): Promise<Awaited<ReturnType<typeof launchTerminal>>> {
8585
const { args = [], cols = 120, rows = 30 } = options
8686
// Remove authentication-related env vars to trigger login flow
87-
const { CODEBUFF_API_KEY, CODEBUFF_TOKEN, ...envWithoutAuth } = {
88-
...process.env,
89-
...cliEnv,
90-
}
87+
const envWithoutAuth = { ...process.env, ...cliEnv }
88+
delete (envWithoutAuth as Record<string, unknown>).CODEBUFF_API_KEY
89+
delete (envWithoutAuth as Record<string, unknown>).CODEBUFF_TOKEN
9190

9291
const session = await launchTerminal({
9392
command: 'bun',

0 commit comments

Comments
 (0)