From 9ebb1a3d08a3c84b8f176d2cbe5fbb4fe20716a4 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 17 Jun 2012 18:01:22 -0500 Subject: [PATCH] audit: prefer ARGV.build_head? to inspecting 'version' Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/audit.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index cb7cb2510e..4e8fd2f2e0 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -133,6 +133,10 @@ def audit_formula_text name, text problems << " * Use ENV instead of invoking '#{$1}' to modify the environment" end + if text =~ /version == ['"]HEAD['"]/ + problems << " * Use 'ARGV.build_head?' instead of inspecting 'version'" + end + return problems end