summaryrefslogtreecommitdiff
path: root/scripts/build_sandbox.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build_sandbox.sh')
-rwxr-xr-xscripts/build_sandbox.sh19
1 files changed, 8 insertions, 11 deletions
diff --git a/scripts/build_sandbox.sh b/scripts/build_sandbox.sh
index f1e85e24..a18af1fe 100755
--- a/scripts/build_sandbox.sh
+++ b/scripts/build_sandbox.sh
@@ -15,6 +15,14 @@
set -euo pipefail
+if ! scripts/sandbox_command.sh -q; then
+ echo "ERROR: sandboxing disabled. See README.md to enable sandboxing."
+ exit 1
+fi
+
+CMD=$(scripts/sandbox_command.sh)
+echo "using $CMD for sandboxing"
+
IMAGE=gemini-code-sandbox
SKIP_NPM_INSTALL_BUILD=false
@@ -30,17 +38,6 @@ while getopts "s" opt; do
done
shift $((OPTIND - 1))
-# use docker if installed, otherwise try to use podman instead
-if command -v docker &> /dev/null; then
- CMD=docker
-elif command -v podman &> /dev/null; then
- CMD=podman
-else
- echo "ERROR: missing docker or podman for sandboxing"
- exit 1
-fi
-echo "using $CMD for sandboxing"
-
# npm install + npm run build unless skipping via -s option
if [ "$SKIP_NPM_INSTALL_BUILD" = false ]; then
npm install