feat: make Claude Code auto-updater configurable - #63
Conversation
.mcp.json is generated per-project by `dclaude chrome`, so it should not be version-controlled. Remove it from the index (kept on disk) and ignore it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The image hardcoded DISABLE_AUTOUPDATER=1, so Claude Code never updated at runtime. Defer to Claude Code's own default (auto-update enabled) and expose a DCLAUDE_DISABLE_AUTOUPDATER env var / DISABLE_AUTOUPDATER .dclaude key (precedence: env > .dclaude > unset) to opt back into disabling it. The flag is passed into the container only when set. Also fix a pre-existing bug in load_config_file: under `set -euo pipefail`, the function leaked the exit status of the last `&&`-style case branch, so a .dclaude file whose last line was already overridden by an env var would make the function return non-zero and silently abort dclaude. Force `return 0`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR adds configuration support for disabling Claude Code's runtime auto-updater via a new ChangesAuto-updater Configuration Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
DISABLE_AUTOUPDATER=1, so Claude Code never updated at runtime. This removes that and defers to Claude Code's own default (auto-update enabled), exposing a knob to opt back into disabling it:DCLAUDE_DISABLE_AUTOUPDATER=1.dclaudekey:DISABLE_AUTOUPDATER=1.dclaude> unset. Passed into the container only when set (mirrors theCLAUDE_MODELpassthrough).load_config_fileleaked the exit status of its last&&-stylecasebranch. Underset -euo pipefail, a.dclaudewhose last line was already overridden by an env var made the function return non-zero and silently abort dclaude (reproduced with the existingAWS_CLIvar). Addedreturn 0..mcp.json: generated per-project bydclaude chrome, so it's removed from the index (kept on disk) and gitignored..dclaudetables + CLAUDE.md install notes (incl. the~/.local-not-a-volume persistence caveat).Notes / behavior change
dclaude rm; ephemeral ones (DCLAUDE_RM=true) re-download per run.Test plan
Verified against a local build (
alanbem/dclaude:local):DCLAUDE_DISABLE_AUTOUPDATER=1→-e DISABLE_AUTOUPDATER=1in the docker args, and confirmedDISABLE_AUTOUPDATER=1on the running containerDISABLE_AUTOUPDATERpassed (defers to Claude default).dclaudewithDISABLE_AUTOUPDATER=1→ flag set to1=0overrides.dclaude=1→ flag set to0(env precedence)DISABLE_AUTOUPDATERAWS_CLIlast-line + env override now exits cleanly (was silent exit 1)bash -n dclaudeclean🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
DISABLE_AUTOUPDATERconfiguration option to control Claude Code's runtime auto-updater behaviorConfiguration Changes
Documentation