diff options
| author | Jonathan Chang | 2017-03-02 21:21:52 -0800 |
|---|---|---|
| committer | Jonathan Chang | 2017-03-02 21:27:12 -0800 |
| commit | 8385f179dfc6dc056a248cb445627fa02f83f397 (patch) | |
| tree | 3977c187121e8a220155cbfc3c9c7607780ff70a /Library/Homebrew/dev-cmd | |
| parent | 6d42e2a527c8c76d9d35f940c35101f6b42c693e (diff) | |
| download | brew-8385f179dfc6dc056a248cb445627fa02f83f397.tar.bz2 | |
audit: reject versions starting with HEAD
Many parts of Homebrew assume that a version string beginning with
"HEAD" is, in fact, a head build. A stable version that begins with
"HEAD" violates this assumption and causes problems, as it's treated
as a head build in some places and as a stable build in others.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index a8c18f7b6..90dd03c1c 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -755,6 +755,9 @@ class FormulaAuditor if version.to_s !~ /\d/ problem "#{name}: version (#{version}) is set to a string without a digit" end + if version.to_s.start_with?("HEAD") + problem "#{name}: non-HEAD version name (#{version}) should not begin with HEAD" + end end if formula.stable && formula.devel |
