From 3364e519b5bebb136ad9606d6af42f4171691bfd Mon Sep 17 00:00:00 2001 From: Milas Bowman Date: Fri, 21 Jan 2022 16:15:02 -0500 Subject: [PATCH] dev-cmd/bump-formula-pr: fix undefined method null error Fix a regression from 8b1fcc7c5c18ec970c30e712ab283d7703694523. Only if `version.nil?` is `Version.detect` used, so we can only use `version.null?` after that. (Otherwise, it's a string.) ``` Error: undefined method `null?' for "X.Y.Z":String Please report this issue: https://docs.brew.sh/Troubleshooting /usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:440:in `check_new_version' /usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:131:in `bump_formula_pr' /usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `
' ``` --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 076e1a2418..c1ee9820ae 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -435,10 +435,9 @@ module Homebrew specs = {} specs[:tag] = tag if tag.present? version = Version.detect(url, **specs) + return if version.null? end - return if version.null? - check_throttle(formula, version) check_closed_pull_requests(formula, tap_remote_repo, args: args, version: version) end