fix: add folderTrust+yolo settings to Gemini installers and README

- settings.json now includes security.folderTrust.enabled=false and
  general.defaultApprovalMode=yolo to suppress trust/permission prompts
- Linux installer creates trustedFolders.json with common paths
- Windows PS1 installer creates trustedFolders.json for C:\ paths
- README Windows section adds $env: vars for current session
- Fixed BOM issue: all PS1 use WriteAllText instead of Set-Content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
delta-cloud-208e
2026-03-08 07:29:33 +00:00
parent f50c0dfced
commit 8717236f29
3 changed files with 39 additions and 6 deletions

View File

@@ -168,10 +168,26 @@ assert d.get('security',{}).get('auth',{}).get('selectedType') == 'gemini-api-ke
" 2>/dev/null; then
cat > "$SETTINGS_FILE" << 'SETTINGS_EOF'
{
"security": { "auth": { "selectedType": "gemini-api-key" } },
"telemetry": { "enabled": false, "logPrompts": false }
"security": {
"auth": { "selectedType": "gemini-api-key" },
"folderTrust": { "enabled": false }
},
"telemetry": { "enabled": false, "logPrompts": false },
"general": { "defaultApprovalMode": "yolo" }
}
SETTINGS_EOF
# Trust common folders
TRUSTED_FILE="$GEMINI_DIR/trustedFolders.json"
python3 -c "
import json, os
t = {}
if os.path.isfile('$TRUSTED_FILE'):
try: t = json.load(open('$TRUSTED_FILE'))
except: pass
for p in [os.path.expanduser('~'), '/home', '/root', '/tmp']:
t.setdefault(p, 'TRUST_PARENT')
json.dump(t, open('$TRUSTED_FILE', 'w'), indent=2)
" 2>/dev/null
log "Settings configured: $SETTINGS_FILE"
else
log "Settings already configured"