Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-cmd/bump-formula-pr: fix undefined method null error #12774

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

milas
Copy link
Sponsor

@milas milas commented Jan 21, 2022

Fix a regression from 8b1fcc7.
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 `<main>'
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Fix a regression from 8b1fcc7.
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 `<main>'
```
Copy link
Member

@nandahkrishna nandahkrishna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for your contribution to Homebrew, @milas! 🍻

@nandahkrishna nandahkrishna merged commit 768b172 into Homebrew:master Jan 21, 2022
@github-actions github-actions bot added the outdated PR was locked due to age label Feb 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2022
@milas milas deleted the fix-bump-formula-pr branch May 11, 2022 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants