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

audit: Don't check new formulae for version decreases #1404

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@bfontaine
Member

bfontaine commented Oct 30, 2016

  • 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 tests with your changes locally?

Right now brew audit fails on new formulae because they don’t have previous version. We don’t have to do these checks on new formulae anyway, hence this return if @new_formula.
However this doesn’t fix the bug because it stills fail if brew audit is run on a new formula without the --new-formula flag. We have to check if versions has at least one element before looking for its max value.

Current error:

Error: comparison of Version::FromURL with nil failed
Please report this bug:
  https://git.io/brew-troubleshooting
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:671:in `<'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:671:in `audit_revision_and_version_scheme'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:1030:in `audit'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:72:in `block in audit'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:68:in `each'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:68:in `audit'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'

See also #1366 (comment)

cc @MikeMcQuaid

@bfontaine bfontaine referenced this pull request Oct 30, 2016

Closed

audit: disable version checking for new formulas. #1405

3 of 5 tasks complete
@bfontaine

This comment has been minimized.

Show comment
Hide comment
@bfontaine

bfontaine Oct 30, 2016

Member

Closing per #1406.

Member

bfontaine commented Oct 30, 2016

Closing per #1406.

@bfontaine bfontaine closed this Oct 30, 2016

@bfontaine bfontaine deleted the bfontaine:audit-dec branch Oct 30, 2016

@bfontaine bfontaine removed the in progress label Oct 30, 2016

@MikeMcQuaid MikeMcQuaid referenced this pull request Oct 30, 2016

Merged

audit: check the stable version does not decrease. #1411

4 of 5 tasks complete

@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.