aboutsummaryrefslogtreecommitdiffstats
path: root/Library/brew.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/brew.rb')
-rwxr-xr-xLibrary/brew.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/brew.rb b/Library/brew.rb
index 9d5ed7a42..8c904c549 100755
--- a/Library/brew.rb
+++ b/Library/brew.rb
@@ -14,15 +14,12 @@ HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent.join("Homebrew")
$:.unshift(HOMEBREW_LIBRARY_PATH.to_s)
require "global"
-if ARGV.first == "--version"
- puts Homebrew.homebrew_version_string
+if ARGV == %w[--version] || ARGV == %w[-v]
+ puts "Homebrew #{Homebrew.homebrew_version_string}"
exit 0
elsif ARGV.first == "-v"
- puts "Homebrew #{Homebrew.homebrew_version_string}"
# Shift the -v to the end of the parameter list
ARGV << ARGV.shift
- # If no other arguments, just quit here.
- exit 0 if ARGV.length == 1
end
if OS.mac?