fix: reset authType settings (#1091)

* fix: reset authType settings

* fix: failed json-output tests

* fix: sandbox exception log to stderr
This commit is contained in:
Mingholy
2025-11-23 17:59:35 +08:00
committed by GitHub
parent 9cfea73207
commit c9af74816a
2 changed files with 3 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ describe('JSON output', () => {
}); });
it('should return a JSON error for enforced auth mismatch before running', async () => { it('should return a JSON error for enforced auth mismatch before running', async () => {
const originalOpenaiApiKey = process.env['OPENAI_API_KEY'];
process.env['OPENAI_API_KEY'] = 'test-key'; process.env['OPENAI_API_KEY'] = 'test-key';
await rig.setup('json-output-auth-mismatch', { await rig.setup('json-output-auth-mismatch', {
settings: { settings: {
@@ -68,7 +69,7 @@ describe('JSON output', () => {
} catch (e) { } catch (e) {
thrown = e as Error; thrown = e as Error;
} finally { } finally {
delete process.env['OPENAI_API_KEY']; process.env['OPENAI_API_KEY'] = originalOpenaiApiKey;
} }
expect(thrown).toBeDefined(); expect(thrown).toBeDefined();

View File

@@ -848,7 +848,7 @@ export async function start_sandbox(
sandboxProcess?.on('close', (code, signal) => { sandboxProcess?.on('close', (code, signal) => {
process.stdin.resume(); process.stdin.resume();
if (code !== 0 && code !== null) { if (code !== 0 && code !== null) {
console.log( console.error(
`Sandbox process exited with code: ${code}, signal: ${signal}`, `Sandbox process exited with code: ${code}, signal: ${signal}`,
); );
} }