[FEATURE] Detect that an installation cannot be updated automatically, or allow indicating claude is managed by a package manager
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I maintain the claude-code port in MacPorts, so MacPorts users can easily install Claude Code and keep it up to date along with all of the other software they maintain via MacPorts.
claude attempts to update itself automatically by default, but this doesn't work when software is installed via MacPorts, because the claude binary will be installed in a directory where regular system users cannot write (/opt/local/bin by default), so these automatic updates will always fail. When a user manages Claude Code via a package manager, tools also shouldn't updates themselves, because otherwise the package manager would no longer be in control of managing versions.
It seems like there is already some kind of support for package managers, because for instance https://github.com/anthropics/claude-code/issues/11405#issuecomment-3644667748 shows this line for users of the Homebrew package manager:
└ Auto-updates: Managed by package manager
However, this does not happen when Claude Code is installed via MacPorts.
Proposed Solution
I think that claude should ideally detect whether the user that is currently running claude has filesystem permissions to update the claude binary that is run. If it doesn't, it should not attempt to update itself.
Alternative Solutions
If updatability for some reason cannot be detected automatically and claude locations are detected as being managed by a package manager by checking against known paths which are used by package managers, then could MacPorts' /opt/local/bin/claude be added as a path managed by a package manager? This would only be a partial solution for MacPorts users though, because MacPorts can use a custom installation prefix (/opt/local is the default installation prefix, but it could be anything).
The port currently recommends users to set the DISABLE_AUTOUPDATER environment variable to 1, but this is a rather clunky solution. Ideally claude would detect that it won't be able to update itself, or otherwise it would be nice to have documentation about how to indicate that an installation is managed by a package manager, so that a package manager can take care of this during the installation.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
_No response_
Additional Context
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗