claude-cac 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cac +23 -1
- package/package.json +1 -1
package/cac
CHANGED
|
@@ -11,7 +11,7 @@ VERSIONS_DIR="$CAC_DIR/versions"
|
|
|
11
11
|
# ── utils: colors, read/write, UUID, proxy parsing ───────────────────────
|
|
12
12
|
|
|
13
13
|
# shellcheck disable=SC2034 # used in build-concatenated cac script
|
|
14
|
-
CAC_VERSION="1.5.
|
|
14
|
+
CAC_VERSION="1.5.4"
|
|
15
15
|
|
|
16
16
|
_read() { [[ -f "$1" ]] && tr -d '[:space:]' < "$1" || echo "${2:-}"; }
|
|
17
17
|
_die() { printf '%b\n' "$(_red "error:") $*" >&2; exit 1; }
|
|
@@ -1044,6 +1044,9 @@ _write_env_settings() {
|
|
|
1044
1044
|
"statusLine": {
|
|
1045
1045
|
"type": "command",
|
|
1046
1046
|
"command": "bash $CLAUDE_CONFIG_DIR/statusline-command.sh"
|
|
1047
|
+
},
|
|
1048
|
+
"env": {
|
|
1049
|
+
"DISABLE_AUTOUPDATER": "1"
|
|
1047
1050
|
}
|
|
1048
1051
|
}
|
|
1049
1052
|
SETTINGS_EOF
|
|
@@ -1603,6 +1606,25 @@ _ensure_initialized() {
|
|
|
1603
1606
|
rm -f "$CAC_DIR/blocked_hosts" 2>/dev/null || true
|
|
1604
1607
|
_write_blocked_hosts 2>/dev/null || true
|
|
1605
1608
|
|
|
1609
|
+
# Patch all existing envs: ensure DISABLE_AUTOUPDATER=1 in settings.json
|
|
1610
|
+
local _sf
|
|
1611
|
+
for _sf in "$ENVS_DIR"/*/.claude/settings.json; do
|
|
1612
|
+
[[ -f "$_sf" ]] || continue
|
|
1613
|
+
grep -q '"DISABLE_AUTOUPDATER"' "$_sf" 2>/dev/null && continue
|
|
1614
|
+
python3 - "$_sf" << 'PYEOF' 2>/dev/null || true
|
|
1615
|
+
import json, sys
|
|
1616
|
+
path = sys.argv[1]
|
|
1617
|
+
with open(path) as f:
|
|
1618
|
+
d = json.load(f)
|
|
1619
|
+
if d.get('env', {}).get('DISABLE_AUTOUPDATER') == '1':
|
|
1620
|
+
sys.exit(0)
|
|
1621
|
+
d.setdefault('env', {})['DISABLE_AUTOUPDATER'] = '1'
|
|
1622
|
+
with open(path, 'w') as f:
|
|
1623
|
+
json.dump(d, f, indent=2)
|
|
1624
|
+
f.write('\n')
|
|
1625
|
+
PYEOF
|
|
1626
|
+
done
|
|
1627
|
+
|
|
1606
1628
|
# PATH (idempotent — always ensure it's in rc file)
|
|
1607
1629
|
local rc_file; rc_file=$(_detect_rc_file)
|
|
1608
1630
|
_write_path_to_rc "$rc_file" >/dev/null 2>&1 || true
|