aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-10-26 18:20:18 +0000
committerMax Howell2009-11-07 18:22:33 +0000
commit03ca3e24d0ccd4633a29aab6b1dc1c43ead5c4e2 (patch)
tree4f3b93ebca44669ac56cac4838b2d4335179bf8f /bin
parent794a55a72b78acf4c5866f20ff39e6fcc759e439 (diff)
downloadbrew-03ca3e24d0ccd4633a29aab6b1dc1c43ead5c4e2.tar.bz2
Don't throw if named.empty?
Generally this isn't desired or useful.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/brew b/bin/brew
index b7e255d84..437be8c73 100755
--- a/bin/brew
+++ b/bin/brew
@@ -80,7 +80,7 @@ begin
dump_config
when 'home', 'homepage'
- if ARGV.named_empty?
+ if ARGV.named.empty?
exec "open", HOMEBREW_WWW
else
exec "open", *ARGV.formulae.collect {|f| f.homepage}
@@ -92,7 +92,7 @@ begin
dirs -= ['Library', 'Cellar', '.git']
Dir.chdir HOMEBREW_PREFIX
exec 'find', *dirs + %w[-type f ( ! -iname .ds_store ! -iname brew )]
- elsif ARGV.named_empty?
+ elsif ARGV.named.empty?
ENV['CLICOLOR']=nil
exec 'ls', *ARGV.options<<HOMEBREW_CELLAR if HOMEBREW_CELLAR.exist?
elsif ARGV.verbose? or not $stdout.tty?
@@ -110,7 +110,7 @@ begin
end
when 'edit'
- if ARGV.named_empty?
+ if ARGV.named.empty?
# EDITOR isn't a good fit here, we need a GUI client that actually has
# a UI for projects, so apologies if this wasn't what you expected,
# please improve it! :)
@@ -163,6 +163,8 @@ begin
when 'create'
if ARGV.include? '--macports'
exec "open", "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}"
+ elsif ARGV.named.empty?
+ raise UsageError
else
exec_editor *ARGV.named.collect {|name| make name}
end
@@ -171,7 +173,7 @@ begin
puts diy
when 'info', 'abv'
- if ARGV.named_empty?
+ if ARGV.named.empty?
puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
elsif ARGV[0][0..6] == 'http://'
puts Pathname.new(ARGV.shift).version