mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
Refactor_sandbox_command (#121)
This commit is contained in:
parent
60fc979332
commit
5e34d9e276
7 changed files with 90 additions and 42 deletions
|
|
@ -15,21 +15,17 @@
|
|||
|
||||
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)
|
||||
IMAGE=gemini-code-sandbox
|
||||
WORKDIR=/sandbox/$(basename "$PWD")
|
||||
CLI_PATH=/usr/local/share/npm-global/lib/node_modules/\@gemini-code/cli
|
||||
DEBUG_PORT=9229
|
||||
|
||||
# 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
|
||||
|
||||
# use interactive tty mode and auto-remove container on exit
|
||||
run_args=(-it --rm)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue