mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Fix seatbelt sandboxing when GEMINI_SANDBOX="" and starting with -s (#1298)
This commit is contained in:
@@ -36,7 +36,12 @@ function getSandboxCommand(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// note environment variable takes precedence over argument (from command line or settings)
|
// 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;
|
if (sandbox === '1' || sandbox === 'true') sandbox = true;
|
||||||
else if (sandbox === '0' || sandbox === 'false' || !sandbox) sandbox = false;
|
else if (sandbox === '0' || sandbox === 'false' || !sandbox) sandbox = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user