mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
Refactor_sandbox_command (#121)
This commit is contained in:
@@ -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=()
|
||||
|
||||
Reference in New Issue
Block a user