From 1d47038b1270f14064bebbc78b1a67b858578f83 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:07:17 -0400 Subject: [PATCH] bump: respect livecheck skipped status `brew bump` understands that some formulae/casks are skipped by livecheck but it doesn't use this information to avoid doing unnecessary or inappropriate work. This modifies related logic to not fetch PR information or try to open a version bump PR if livecheck is skipped. livecheck is our only source of version information these days, so we can't try to version bump a package if we don't have upstream version information. This has been leading to an "Invalid usage: `--version` must not be empty" error and this _should_ fix the issue under these particular circumstances. There's still plenty of room for improvement in how all of this is handled in bump but this is just a quick bug fix. --- Library/Homebrew/dev-cmd/bump.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bump.rb b/Library/Homebrew/dev-cmd/bump.rb index 788e9cf891..c4965199f7 100644 --- a/Library/Homebrew/dev-cmd/bump.rb +++ b/Library/Homebrew/dev-cmd/bump.rb @@ -382,6 +382,7 @@ module Homebrew if !args.no_pull_requests? && (new_version.general != "unable to get versions") && + (new_version.general != "skipped") && (new_version != current_version) # We use the ARM version for the pull request version. This is # consistent with the behavior of bump-cask-pr. @@ -480,6 +481,7 @@ module Homebrew end if !args.no_pull_requests? && (new_version.general != "unable to get versions") && + (new_version.general != "skipped") && !versions_equal if duplicate_pull_requests duplicate_pull_requests_text = duplicate_pull_requests @@ -497,7 +499,11 @@ module Homebrew end end - return unless args.open_pr? + if !args.open_pr? || + (new_version.general == "unable to get versions") || + (new_version.general == "skipped") + return + end if GitHub.too_many_open_prs?(formula_or_cask.tap) odie "You have too many PRs open: close or merge some first!"