summaryrefslogtreecommitdiff
path: root/scripts/sandbox_command.sh
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-05-29 16:25:16 -0700
committerGitHub <[email protected]>2025-05-29 16:25:16 -0700
commit1c066548b4d5fcaea4f784a0cddab7a644716eab (patch)
treec8a5a43cc95e713441829d4a1b06cb5c5bbf4348 /scripts/sandbox_command.sh
parentfe049c286f3fa20d7ea232c5d008f0112bb7d955 (diff)
allow comments in settings when parsed in scripts via jq (#603)
Diffstat (limited to 'scripts/sandbox_command.sh')
-rwxr-xr-xscripts/sandbox_command.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sandbox_command.sh b/scripts/sandbox_command.sh
index 11a5d62e..61dd3178 100755
--- a/scripts/sandbox_command.sh
+++ b/scripts/sandbox_command.sh
@@ -35,7 +35,7 @@ shift $((OPTIND - 1))
# note it can be string or boolean, and if missing jq will return null
USER_SETTINGS_FILE="$HOME/.gemini/settings.json"
if [ -z "${GEMINI_SANDBOX:-}" ] && [ -f "$USER_SETTINGS_FILE" ]; then
- USER_SANDBOX_SETTING=$(jq -r '.sandbox' "$USER_SETTINGS_FILE")
+ USER_SANDBOX_SETTING=$(sed -e 's/\/\/.*//' -e 's/\/\*.*\*\///g' -e '/^[[:space:]]*\/\//d' "$USER_SETTINGS_FILE" | jq -r '.sandbox')
if [ "$USER_SANDBOX_SETTING" != null ]; then
GEMINI_SANDBOX=$USER_SANDBOX_SETTING
fi