summaryrefslogtreecommitdiff
path: root/scripts/start.sh
blob: 2c24c61d1023773a733c9b42436df5fb5756e32f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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

# 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