summaryrefslogtreecommitdiff
path: root/packages/cli/src/config/sandboxConfig.ts
diff options
context:
space:
mode:
authorEddie Santos <[email protected]>2025-06-19 14:40:10 -0700
committerGitHub <[email protected]>2025-06-19 21:40:10 +0000
commitc1486c47eeedcea065d69ced1f6b454e86ff3191 (patch)
tree41f305ed7b3e8ff0a7df6e6545a3028095a61fe3 /packages/cli/src/config/sandboxConfig.ts
parent619da700709560828c5f6ef112e48994f3238cdc (diff)
fix: auto-update sandbox regression (#1221)
Diffstat (limited to 'packages/cli/src/config/sandboxConfig.ts')
-rw-r--r--packages/cli/src/config/sandboxConfig.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/cli/src/config/sandboxConfig.ts b/packages/cli/src/config/sandboxConfig.ts
index e0adf0ac..59e19a49 100644
--- a/packages/cli/src/config/sandboxConfig.ts
+++ b/packages/cli/src/config/sandboxConfig.ts
@@ -30,6 +30,11 @@ function isSandboxCommand(value: string): value is SandboxConfig['command'] {
function getSandboxCommand(
sandbox?: boolean | string,
): SandboxConfig['command'] | '' {
+ // If the SANDBOX env var is set, we're already inside the sandbox.
+ if (process.env.SANDBOX) {
+ return '';
+ }
+
// note environment variable takes precedence over argument (from command line or settings)
sandbox = process.env.GEMINI_SANDBOX?.toLowerCase().trim() ?? sandbox;
if (sandbox === '1' || sandbox === 'true') sandbox = true;