From 415ec91c6df723b72ff1ef648f176b8d5a5a2dbf Mon Sep 17 00:00:00 2001 From: Olcan Date: Fri, 25 Apr 2025 12:38:38 -0700 Subject: [PATCH] detect missing sandbox image and provide useful error message (#174) --- scripts/start_sandbox.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/start_sandbox.sh b/scripts/start_sandbox.sh index 1661fa14..18e81bde 100755 --- a/scripts/start_sandbox.sh +++ b/scripts/start_sandbox.sh @@ -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