mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-27 12:13:27 -07:00
fix(scripts): scrub CI env vars in dev to keep interactive mode (#27159)
This commit is contained in:
@@ -66,6 +66,21 @@ const env = {
|
||||
DEV: 'true',
|
||||
};
|
||||
|
||||
const keepCiEnv =
|
||||
process.env.GEMINI_KEEP_CI_ENV === '1' ||
|
||||
process.env.GEMINI_KEEP_CI_ENV === 'true';
|
||||
if (!keepCiEnv) {
|
||||
const ciKeys = ['CI', 'CONTINUOUS_INTEGRATION', 'GITHUB_ACTIONS'].filter(
|
||||
(k) => k in env,
|
||||
);
|
||||
if (ciKeys.length > 0) {
|
||||
ciKeys.forEach((k) => delete env[k]);
|
||||
process.stderr.write(
|
||||
`[gemini] Removed CI env vars to keep interactive mode working in dev: ${ciKeys.join(', ')}. Set GEMINI_KEEP_CI_ENV=1 to disable.\n`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (isInDebugMode) {
|
||||
// If this is not set, the debugger will pause on the outer process rather
|
||||
// than the relaunched process making it harder to debug.
|
||||
|
||||
Reference in New Issue
Block a user