topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
1.95k stars 127 forks source link

Failing at homebrew #809

Closed orzklv closed 4 months ago

orzklv commented 4 months ago

Erroneous Behavior

When I run topgrade, it tries to run brew upgrade --ignore-pinned which is deprecated.

Expected Behavior

Fail, because --ignore-pinned is deprecated.

Steps to reproduce

Just run topgrade on latest homebrew package manager.

Possible Cause (Optional)

Remove --ignore-pinned.

Problem persists without calling from topgrade

Did you run topgrade through Remote Execution

Additional Details

Verbose Output (topgrade -v)

~ via ❄️  impure (shell)
❯ topgrade -v
DEBUG Configuration at /Users/sakhib/.config/topgrade.toml
DEBUG Version: 13.0.0
DEBUG OS: aarch64-apple-darwin
DEBUG Args { inner: ["topgrade", "-v"] }
DEBUG Binary path: Ok("/Users/sakhib/.nix-profile/bin/topgrade")
DEBUG self-update Feature Enabled: false
DEBUG Configuration: Config { opt: CommandLineArgs { edit_config: false, show_config_reference: false, run_in_tmux: false, cleanup: false, dry_run: false, no_retry: false, disable: [], only: [], custom_commands: [], env: [], verbose: true, keep_at_end: false, skip_notify: false, yes: None, disable_predefined_git_repos: false, config: None, remote_host_limit: None, show_skipped: false, log_filter: "warn", gen_completion: None, gen_manpage: false, no_self_update: false }, config_file: ConfigFile { include: None, misc: Some(Misc { pre_sudo: None, sudo_command: None, disable: Some([Nix, Bun, Node, Pnpm, Yarn, HomeManager, Vscode]), ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: Some(true), no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None, log_filters: None }), pre_commands: None, post_commands: None, commands: Some({"Home Manager": "home-manager switch --flake github:orzklv/nix", "Nix": "nix-channel --update && nix-env -u '*'"}), python: None, composer: None, brew: Some(Brew { greedy_cask: None, autoremove: Some(true) }), linux: None, git: None, windows: None, npm: None, yarn: None, vim: None, firmware: None, vagrant: None, flatpak: None, distrobox: None }, allowed_steps: [AM, AppMan, Asdf, Atom, Bin, Bob, BrewCask, BrewFormula, Cargo, Chezmoi, Chocolatey, Choosenim, Composer, Conda, ConfigUpdate, Containers, CustomCommands, DebGet, Deno, Distrobox, DkpPacman, Dotnet, Emacs, Firmware, Flatpak, Flutter, Fossil, Gcloud, Gem, Ghcup, GithubCliExtensions, GitRepos, GnomeShellExtensions, Go, Guix, Haxelib, Helm, Jetpack, Julia, Juliaup, Kakoune, Helix, Krew, Lure, Macports, Mamba, Miktex, Mas, Maza, Micro, Myrepos, Opam, Pacdef, Pacstall, Pearl, Pip3, PipReview, PipReviewLocal, Pipupgrade, Pipx, Pkg, Pkgin, Powershell, Protonup, Raco, Rcm, Remotes, Restarts, Rtcl, RubyGems, Rustup, Scoop, Sdkman, SelfUpdate, Sheldon, Shell, Snap, Sparkle, Spicetify, Stack, Stew, System, Tldr, Tlmgr, Tmux, Toolbx, Vagrant, Vcpkg, Vim, Winget, Wsl, WslUpdate, Yadm] }
DEBUG Detected "/Users/sakhib/.nix-profile/bin/git" as "git"
DEBUG Cannot find "pwsh"
DEBUG Cannot find "powershell"
DEBUG Path "/Users/sakhib/.config/emacs" doesn't exist
DEBUG Path "/Users/sakhib/.emacs.d" doesn't exist
DEBUG Cannot find "doas"
DEBUG Detected "/usr/bin/sudo" as "sudo"
DEBUG Step "Brew (ARM)"
DEBUG Detected "/opt/homebrew/bin/brew" as "/opt/homebrew/bin/brew"

── 14:40:57 - Brew ─────────────────────────────────────────────────────────────
DEBUG Executing command `/opt/homebrew/bin/brew update`
==> Updating Homebrew...
Already up-to-date.
DEBUG Executing command `/opt/homebrew/bin/brew upgrade --ignore-pinned --formula`
Error: Calling `brew upgrade --ignore-pinned` is disabled! There is no replacement.
Please report this issue:
  https://docs.brew.sh/Troubleshooting
DEBUG Command failed: Err(
   0: Command failed: `/opt/homebrew/bin/brew upgrade --ignore-pinned --formula`
   1: `/opt/homebrew/bin/brew` failed: exit status: 1

Location:
   src/steps/os/unix.rs:287)
DEBUG Step "Brew (ARM)" failed:
   0: Command failed: `/opt/homebrew/bin/brew upgrade --ignore-pinned --formula`
   1: `/opt/homebrew/bin/brew` failed: exit status: 1

Location:
   src/steps/os/unix.rs:287
Brew (ARM) failed:
   0: Command failed: `/opt/homebrew/bin/brew upgrade --ignore-pinned --formula`
   1: `/opt/homebrew/bin/brew` failed: exit status: 1

Location:
   src/steps/os/unix.rs:287
Retry? (y)es/(N)o/(s)hell/(q)uit

Runtime output

~
❯ topgrade

── 14:35:51 - Brew
==> Updating Homebrew...
Already up-to-date.
Error: Calling `brew upgrade --ignore-pinned` is disabled! There is no replacement.
Please report this issue:
  https://docs.brew.sh/Troubleshooting
Brew (ARM) failed:
   0: Command failed: `/opt/homebrew/bin/brew upgrade --ignore-pinned --formula`
   1: `/opt/homebrew/bin/brew` failed: exit status: 1

Location:
   src/steps/os/unix.rs:287
Retry? (y)es/(N)o/(s)hell/(q)uit
SteveLauC commented 4 months ago

Duplicate of https://github.com/topgrade-rs/topgrade/issues/628, and it has already been fixed (not released yet).