dev-cmd/audit: handle nil newest_committed_revision.

Fixes #7712.
This commit is contained in:
Mike McQuaid 2020-06-10 08:39:41 +01:00
parent 3a7213c255
commit 0dd004f53d
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -786,7 +786,8 @@ module Homebrew
!previous_revision.nil? &&
current_revision < previous_revision
problem "revision should not decrease (from #{previous_revision} to #{current_revision})"
elsif current_revision > (newest_committed_revision + 1)
elsif newest_committed_revision &&
current_revision > (newest_committed_revision + 1)
problem "revisions should only increment by 1"
end
end