mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 17:41:24 -07:00
Fix: Prevent freezing in non-interactive Gemini CLI when debug mode is enabled (#14580)
This commit is contained in:
@@ -134,12 +134,14 @@ export function entrypoint(workdir: string, cliArgs: string[]): string[] {
|
||||
);
|
||||
|
||||
const quotedCliArgs = cliArgs.slice(2).map((arg) => quote([arg]));
|
||||
const isDebugMode =
|
||||
process.env['DEBUG'] === 'true' || process.env['DEBUG'] === '1';
|
||||
const cliCmd =
|
||||
process.env['NODE_ENV'] === 'development'
|
||||
? process.env['DEBUG']
|
||||
? isDebugMode
|
||||
? 'npm run debug --'
|
||||
: 'npm rebuild && npm run start --'
|
||||
: process.env['DEBUG']
|
||||
: isDebugMode
|
||||
? `node --inspect-brk=0.0.0.0:${process.env['DEBUG_PORT'] || '9229'} $(which gemini)`
|
||||
: 'gemini';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user