summaryrefslogtreecommitdiff
path: root/scripts/start.sh
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-04-22 13:51:50 -0700
committerGitHub <[email protected]>2025-04-22 13:51:50 -0700
commit5e34d9e2764da1251eb777f4f32e5cf1804ee949 (patch)
treea6882af2cbf32315044a65f68acf437d8492efbd /scripts/start.sh
parent60fc979332572a8ae2f7097cc634e26cb4836269 (diff)
Refactor_sandbox_command (#121)
Diffstat (limited to 'scripts/start.sh')
-rwxr-xr-xscripts/start.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/start.sh b/scripts/start.sh
index c4c57f3c..03c52c79 100755
--- a/scripts/start.sh
+++ b/scripts/start.sh
@@ -18,13 +18,11 @@ set -euo pipefail
# check build status, write warnings to file for app to display if needed
node ./scripts/check-build-status.js
-# if GEMINI_CODE_SANDBOX is set (can be in .env file), start in sandbox container
-if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]] || \
- { [ -f .env ] && grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; }; then
- echo "Running in sandbox container ..."
+# if sandboxing is enabled, start in sandbox container
+if scripts/sandbox_command.sh -q; then
scripts/start_sandbox.sh "$@"
else
- echo "WARNING: running outside of sandbox. Set GEMINI_CODE_SANDBOX to enable sandbox."
+ echo "WARNING: OUTSIDE SANDBOX. See README.md to enable sandboxing."
if [ -n "${DEBUG:-}" ]; then
node --inspect-brk node_modules/@gemini-code/cli "$@"
else