aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2012-08-15 21:53:16 -0500
committerMisty De Meo2012-09-17 19:06:40 -0500
commitb29d1fdd5f1167b9c9e08b3db08ac214ef522d9c (patch)
tree3fe8f4664a853ae89ea2ca77abe526dbc2db5dea /Library
parenta63eec0f8869807d91151191ca164c03adf48e0b (diff)
downloadhomebrew-b29d1fdd5f1167b9c9e08b3db08ac214ef522d9c.tar.bz2
ARGV: add .json
Used by brew info; may be used by other commands in the future.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ARGV.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 694850df2..3c49480e2 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -101,6 +101,11 @@ module HomebrewArgvExtension
include? '--ignore-dependencies'
end
+ def json
+ json_rev = find {|o| o =~ /--json=.+/}
+ json_rev.split("=").last if json_rev
+ end
+
def build_head?
include? '--HEAD'
end