Skip to content

Commit c9af748

Browse files
authored
fix: reset authType settings (#1091)
* fix: reset authType settings * fix: failed json-output tests * fix: sandbox exception log to stderr
1 parent 9cfea73 commit c9af748

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

integration-tests/json-output.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ describe('JSON output', () => {
5454
});
5555

5656
it('should return a JSON error for enforced auth mismatch before running', async () => {
57+
const originalOpenaiApiKey = process.env['OPENAI_API_KEY'];
5758
process.env['OPENAI_API_KEY'] = 'test-key';
5859
await rig.setup('json-output-auth-mismatch', {
5960
settings: {
@@ -68,7 +69,7 @@ describe('JSON output', () => {
6869
} catch (e) {
6970
thrown = e as Error;
7071
} finally {
71-
delete process.env['OPENAI_API_KEY'];
72+
process.env['OPENAI_API_KEY'] = originalOpenaiApiKey;
7273
}
7374

7475
expect(thrown).toBeDefined();

packages/cli/src/utils/sandbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ export async function start_sandbox(
848848
sandboxProcess?.on('close', (code, signal) => {
849849
process.stdin.resume();
850850
if (code !== 0 && code !== null) {
851-
console.log(
851+
console.error(
852852
`Sandbox process exited with code: ${code}, signal: ${signal}`,
853853
);
854854
}

0 commit comments

Comments
 (0)