From 6a1c62731bf21af32c36d1687006b2491df9ee68 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Sun, 22 Jun 2025 19:33:29 +0100 Subject: Fix seatbelt sandboxing when GEMINI_SANDBOX="" and starting with -s (#1298) --- packages/cli/src/config/sandboxConfig.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/cli/src') 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; -- cgit v1.2.3