detect missing sandbox image and provide useful error message (#174)

This commit is contained in:
Olcan 2025-04-25 12:38:38 -07:00 committed by GitHub
parent 320f54e205
commit 415ec91c6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,12 @@ CMD=$(scripts/sandbox_command.sh)
IMAGE=gemini-code-sandbox
DEBUG_PORT=9229
# stop if image is missing
if ! $CMD images -q "$IMAGE" | grep -q .; then
echo "ERROR: $IMAGE is missing. Try \`npm run build\` with sandboxing enabled."
exit 1
fi
PROJECT=$(basename "$PWD")
WORKDIR=/sandbox/$PROJECT
CLI_PATH=/usr/local/share/npm-global/lib/node_modules/\@gemini-code/cli