summaryrefslogtreecommitdiff
path: root/scripts/start.sh
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-04-21 07:50:18 -0700
committerGitHub <[email protected]>2025-04-21 07:50:18 -0700
commit39bdedab9c218ca1e4eb7204e7c1dd085be98635 (patch)
tree83806d21e6bbf036b92d9b792999d9474d4a9389 /scripts/start.sh
parentbfb064024e3e88c0f707595b50e48a1e7c65063b (diff)
seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76)
Diffstat (limited to 'scripts/start.sh')
-rwxr-xr-xscripts/start.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/start.sh b/scripts/start.sh
index b85a8af0..2c24c61d 100755
--- a/scripts/start.sh
+++ b/scripts/start.sh
@@ -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 "$@" \ No newline at end of file
+
+# 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 \ No newline at end of file