mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76)
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# check build status, write warnings to file for app to display if needed
|
||||
node ./scripts/check-build-status.js
|
||||
node node_modules/@gemini-code/cli "$@"
|
||||
|
||||
# if GEMINI_CODE_SANDBOX is set (can be in .env file), start in sandbox container
|
||||
if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]] || grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; then
|
||||
echo "Running in sandbox container ..."
|
||||
scripts/start_sandbox.sh "$@"
|
||||
else
|
||||
echo "WARNING: running outside of sandbox. Set GEMINI_CODE_SANDBOX to enable sandbox."
|
||||
node node_modules/@gemini-code/cli "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user