From 8b1fcc7c5c18ec970c30e712ab283d7703694523 Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Thu, 20 Jan 2022 19:19:28 -0500 Subject: [PATCH] dev-cmd/bump-formula-pr: fix for undetectable version Currently, `brew bump-formula-pr` errors out without a proper message when `--version` isn't specified and the formula's version cannot be parsed from the URL. We fix this by returning early from `check_new_version` when the detected version is Version::NULL. --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index c2491dba3b..4b03a8244e 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -436,6 +436,9 @@ module Homebrew specs[:tag] = tag if tag.present? version = Version.detect(url, **specs) end + + return if version.null? + check_throttle(formula, version) check_closed_pull_requests(formula, tap_remote_repo, args: args, version: version) end