fix(cli): use resolved sandbox state for auto-update check (#26285)

This commit is contained in:
Adib234
2026-04-30 18:06:01 -04:00
committed by GitHub
parent 892c8a720d
commit f497240f7e
3 changed files with 31 additions and 16 deletions
+2 -1
View File
@@ -68,13 +68,14 @@ export function handleAutoUpdate(
info: UpdateObject | null,
settings: LoadedSettings,
projectRoot: string,
isSandboxEnabled: boolean,
spawnFn: typeof spawn = spawnWrapper,
) {
if (!info) {
return;
}
if (settings.merged.tools.sandbox || process.env['GEMINI_SANDBOX']) {
if (isSandboxEnabled) {
updateEventEmitter.emit('update-info', {
message: `${info.message}\nAutomatic update is not available in sandbox mode.`,
});