fix(scripts): scrub CI env vars in dev to keep interactive mode (#27159)

This commit is contained in:
Hashaam Zahid
2026-05-20 22:55:54 +05:00
committed by GitHub
parent 99ae4d8b81
commit c854b60f75
+15
View File
@@ -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.