diff options
Diffstat (limited to 'packages/cli/src/config/sandboxConfig.ts')
| -rw-r--r-- | packages/cli/src/config/sandboxConfig.ts | 5 |
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; |
