diff options
| author | Olcan <[email protected]> | 2025-04-22 13:51:50 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-22 13:51:50 -0700 |
| commit | 5e34d9e2764da1251eb777f4f32e5cf1804ee949 (patch) | |
| tree | a6882af2cbf32315044a65f68acf437d8492efbd /scripts/sandbox.sh | |
| parent | 60fc979332572a8ae2f7097cc634e26cb4836269 (diff) | |
Refactor_sandbox_command (#121)
Diffstat (limited to 'scripts/sandbox.sh')
| -rwxr-xr-x | scripts/sandbox.sh | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/sandbox.sh b/scripts/sandbox.sh index 44efe9b9..c851da08 100755 --- a/scripts/sandbox.sh +++ b/scripts/sandbox.sh @@ -15,6 +15,11 @@ set -euo pipefail +if ! scripts/sandbox_command.sh -q; then + echo "ERROR: sandboxing disabled. See README.md to enable sandboxing." + exit 1 +fi + # parse flags interactive=false while getopts "i" opt; do @@ -36,18 +41,8 @@ while getopts "i" opt; do done shift $((OPTIND - 1)) - IMAGE=gemini-code-sandbox - -# 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 +CMD=$(scripts/sandbox_command.sh) # list all containers running on sandbox image sandboxes=() |
