better sandbox check (#150)

This commit is contained in:
Olcan 2025-04-24 10:32:30 -07:00 committed by GitHub
parent aed42a726a
commit d8c0587346
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@ async function main() {
const config = loadCliConfig();
let input = config.getQuestion();
if (process.env.GEMINI_CODE_SANDBOX && !process.env.SANDBOX) {
const sandboxEnabled =
process.env.GEMINI_CODE_SANDBOX &&
!['0', 'false'].includes(process.env.GEMINI_CODE_SANDBOX.toLowerCase());
if (sandboxEnabled && !process.env.SANDBOX) {
console.log('WARNING: sandboxing is enabled, but still OUTSIDE sandbox');
// TODO: get inside sandbox
}