Merge pull request #12766 from nandahkrishna/bump-null-version-fix

dev-cmd/bump-formula-pr: fix for undetectable version
This commit is contained in:
Nanda H Krishna 2022-01-21 13:30:02 -05:00 committed by GitHub
commit caebaaf9f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,7 +408,7 @@ module Homebrew
resource.owner = Resource.new(formula.name)
forced_version = new_version && new_version != resource.version
resource.version = new_version if forced_version
odie "No `--version=` argument specified!" if resource.version.blank?
odie "Couldn't identify version, specify it using `--version=`." if resource.version.blank?
[resource.fetch, forced_version]
end
@ -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