aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorMisty De Meo2012-08-15 21:53:16 -0500
committerMisty De Meo2012-09-17 19:06:40 -0500
commitee4c696380fe34cd3a5dcca42156f4f56f7f3dcc (patch)
tree855e5ca68a633d34c5a4217bf725868f61e99311 /Library/Homebrew/extend
parent3473bbc010e9b169181dc180406c97cb2176ecb8 (diff)
downloadbrew-ee4c696380fe34cd3a5dcca42156f4f56f7f3dcc.tar.bz2
ARGV: add .json
Used by brew info; may be used by other commands in the future.
Diffstat (limited to 'Library/Homebrew/extend')
-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