Hmbown/CodeWhale · error
The package-managed executable was not changed.
Error message
The package-managed executable was not changed.
What it means
run_update detects that the running executable came from a package-managed install (apt, brew, etc.) via managed_install_warning. Self-update must not overwrite a file owned by the system package manager, so when the update is not a --check run it bails, leaving the executable unchanged and directing the user to update via their package manager or migrate to the GitHub release channel.
Solutions
- Update through the package manager instead: e.g. `apt upgrade`, `brew upgrade`, `dnf upgrade`.
- Migrate to the GitHub release channel by installing the official binary over the package-managed one, then self-update will work.
- Use the update command with --check to see available versions without attempting to modify the executable.
- Uninstall the package-managed copy and install from GitHub releases before updating.
Example fix
// before codewhale update # fails on package-managed install // after brew upgrade codewhale # or: codewhale update --check
Defensive patterns
Strategy: fallback
Validate before calling
codewhale update --check # inspects install_method without modifying anything
Try / catch
// shell if ! codewhale update --check; then brew upgrade codewhale || apt-get install --only-upgrade codewhale fi
Prevention
- Record how the binary was installed and always update through that channel.
- Run `update --check` in CI instead of unconditional self-update.
- Prefer user-directory installs (e.g. cargo/homebrew-managed user dirs) for machines where you want self-update to work.
When it happens
Trigger: Running the self-update command on a binary installed through a package manager (install_method reports a managed install) without --check only.
Common situations: Installing via apt/dnf/brew/scoop then running `codewhale update`; CI scripts that auto-update the binary regardless of install source; upgrading a package-managed install whose repo version is stale.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Refusing to replace managed/system path
- The system/package executable was not changed.
- A positive pull request number is required
- account_agent_model_unconfigured
- Account settings import is not available yet; local config…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/8f7d1f09fca42fbb.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/update.rs:75
let channel = ReleaseChannel::from_beta_flag(beta);
let current_version = env!("CARGO_PKG_VERSION");
let proxy = proxy_arg
.as_deref()
.map(validate_and_build_proxy)
.transpose()?;
println!("Checking for {} updates...", channel.label());
println!("Current binary: {}", current_exe.display());
println!("Current version: v{current_version}");
if legacy_binary {
println!();
println!("{}", legacy_binary_message(¤t_exe));
}
if let Some(warning) = managed_install_warning(install_method) {
println!();
println!("{warning}");
if !check_only {
bail!("The package-managed executable was not changed.");
}
}
if protected_location {
println!(
"System/package directory: in-place self-update is disabled.\n\n{GITHUB_MIGRATION_HELP}"
);
if !check_only {
bail!("The system/package executable was not changed.");
}
}
if check_only {
let fetched = fetch_latest_release(channel, proxy.as_ref())
.with_context(update_network_fallback_hint)?;
let latest_tag = &fetched.release.tag_name;
println!("Latest {} release: {latest_tag}", channel.label());
if update_is_needed(channel, current_version, latest_tag)? {
if install_method.supports_self_update() && !protected_location {View on GitHub (pinned to 73e0f67d83)