mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 01:51:20 -07:00
Update error codes when process exiting the gemini cli (#13728)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import { expect, describe, it, beforeEach, afterEach } from 'vitest';
|
||||
import { TestRig } from './test-helper.js';
|
||||
import { join } from 'node:path';
|
||||
import { ExitCodes } from '@google/gemini-cli-core/src/index.js';
|
||||
|
||||
describe('JSON output', () => {
|
||||
let rig: TestRig;
|
||||
@@ -81,7 +82,7 @@ describe('JSON output', () => {
|
||||
|
||||
expect(payload.error).toBeDefined();
|
||||
expect(payload.error.type).toBe('Error');
|
||||
expect(payload.error.code).toBe(1);
|
||||
expect(payload.error.code).toBe(ExitCodes.FATAL_AUTHENTICATION_ERROR);
|
||||
expect(payload.error.message).toContain(
|
||||
"enforced authentication type is 'gemini-api-key'",
|
||||
);
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('mixed input crash prevention', () => {
|
||||
expect(error).toBeInstanceOf(Error);
|
||||
const err = error as Error;
|
||||
|
||||
expect(err.message).toContain('Process exited with code 1');
|
||||
expect(err.message).toContain('Process exited with code 42');
|
||||
expect(err.message).toContain(
|
||||
'--prompt-interactive flag cannot be used when input is piped',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user