diff options
| author | N. Taylor Mullen <[email protected]> | 2025-06-22 19:33:29 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-22 18:33:29 +0000 |
| commit | 6a1c62731bf21af32c36d1687006b2491df9ee68 (patch) | |
| tree | b1a938ebf55c445ed546af84a37b80f4e55decc0 /packages/cli/src | |
| parent | 3c656cfbc619e82c3ecf3ea5356cf34cac58c539 (diff) | |
Fix seatbelt sandboxing when GEMINI_SANDBOX="" and starting with -s (#1298)
Diffstat (limited to 'packages/cli/src')
| -rw-r--r-- | packages/cli/src/config/sandboxConfig.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/cli/src/config/sandboxConfig.ts b/packages/cli/src/config/sandboxConfig.ts index 59e19a49..9997046f 100644 --- a/packages/cli/src/config/sandboxConfig.ts +++ b/packages/cli/src/config/sandboxConfig.ts @@ -36,7 +36,12 @@ function getSandboxCommand( } // note environment variable takes precedence over argument (from command line or settings) - sandbox = process.env.GEMINI_SANDBOX?.toLowerCase().trim() ?? sandbox; + const environmentConfiguredSandbox = + process.env.GEMINI_SANDBOX?.toLowerCase().trim() ?? ''; + sandbox = + environmentConfiguredSandbox?.length > 0 + ? environmentConfiguredSandbox + : sandbox; if (sandbox === '1' || sandbox === 'true') sandbox = true; else if (sandbox === '0' || sandbox === 'false' || !sandbox) sandbox = false; |
