Refactor_sandbox_command (#121)

This commit is contained in:
Olcan 2025-04-22 13:51:50 -07:00 committed by GitHub
parent 60fc979332
commit 5e34d9e276
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 90 additions and 42 deletions

View file

@ -23,9 +23,8 @@ fi
# build all workspaces/packages
npm run build --workspaces
# also build container image if GEMINI_CODE_SANDBOX is set (can be in .env file)
# also build container image if sandboxing is enabled
# skip (-s) npm install + build since we did that above
if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]] || \
{ [ -f .env ] && grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; }; then
if scripts/sandbox_command.sh -q; then
scripts/build_sandbox.sh -s
fi