seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76)

This commit is contained in:
Olcan
2025-04-21 07:50:18 -07:00
committed by GitHub
parent bfb064024e
commit 39bdedab9c
7 changed files with 89 additions and 28 deletions

View File

@@ -1,5 +1,14 @@
#!/bin/bash
set -euo pipefail
# check build status, write warnings to file for app to display if needed
node ./scripts/check-build-status.js
node node_modules/@gemini-code/cli "$@"
# if GEMINI_CODE_SANDBOX is set (can be in .env file), start in sandbox container
if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]] || grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; then
echo "Running in sandbox container ..."
scripts/start_sandbox.sh "$@"
else
echo "WARNING: running outside of sandbox. Set GEMINI_CODE_SANDBOX to enable sandbox."
node node_modules/@gemini-code/cli "$@"
fi