diff options
| author | Mike McQuaid | 2012-03-16 15:14:20 +1300 |
|---|---|---|
| committer | Mike McQuaid | 2012-03-18 15:43:39 +1300 |
| commit | 9c16145d8c22e856ef7dca0ebcfca9519392687a (patch) | |
| tree | dd382b96e56444a9c2b8ed8520c80e629d60998f /Library/Homebrew/cmd | |
| parent | b27b761931b987b9dd8a9fc080bbf35270af7cca (diff) | |
| download | homebrew-9c16145d8c22e856ef7dca0ebcfca9519392687a.tar.bz2 | |
Set MACOS_VERSION as 0 on non-OSX platforms.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/versions.rb | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 7c1d2e93d..4db70cb32 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -624,7 +624,7 @@ def check_for_multiple_volumes end def check_for_git - unless system "/usr/bin/which -s git" then <<-EOS.undent + unless which_s "git" then <<-EOS.undent Git could not be found in your PATH. Homebrew uses Git for several internal functions, and some formulae use Git checkouts instead of stable tarballs. You may want to install Git: @@ -634,7 +634,7 @@ def check_for_git end def check_git_newline_settings - return unless system "/usr/bin/which -s git" + return unless which_s "git" autocrlf = `git config --get core.autocrlf`.chomp safecrlf = `git config --get core.safecrlf`.chomp @@ -765,7 +765,7 @@ def check_missing_deps end def check_git_status - return unless system "/usr/bin/which -s git" + return unless which_s "git" HOMEBREW_REPOSITORY.cd do unless `git status -s -- Library/Homebrew/ 2>/dev/null`.chomp.empty? then <<-EOS.undent You have uncommitted modifications to Homebrew's core. @@ -794,7 +794,7 @@ end def check_git_version # see https://github.com/blog/642-smart-http-support - return unless system "/usr/bin/which -s git" + return unless which_s "git" `git --version`.chomp =~ /git version (\d)\.(\d)\.(\d)/ if $2.to_i < 6 or $2.to_i == 6 and $3.to_i < 6 then <<-EOS.undent @@ -806,7 +806,7 @@ def check_git_version end def check_for_enthought_python - if system "/usr/bin/which -s enpkg" then <<-EOS.undent + if which_s "enpkg" then <<-EOS.undent Enthought Python was found in your PATH. This can cause build problems, as this software installs its own copies of iconv and libxml2 into directories that are picked up by @@ -816,7 +816,7 @@ def check_for_enthought_python end def check_for_bad_python_symlink - return unless system "/usr/bin/which -s python" + return unless which_s "python" # Indeed Python --version outputs to stderr (WTF?) `python --version 2>&1` =~ /Python (\d+)\./ unless $1 == "2" then <<-EOS.undent diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index aacd68fc5..383c0121f 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -4,7 +4,7 @@ require 'cmd/untap' module Homebrew extend self def update - abort "Please `brew install git' first." unless system "/usr/bin/which -s git" + abort "Please `brew install git' first." unless which_s "git" # ensure GIT_CONFIG is unset as we need to operate on .git/config ENV.delete('GIT_CONFIG') diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb index 6c13e741a..ba312ab6f 100644 --- a/Library/Homebrew/cmd/versions.rb +++ b/Library/Homebrew/cmd/versions.rb @@ -2,7 +2,7 @@ require 'formula' module Homebrew extend self def versions - raise "Please `brew install git' first" unless system "/usr/bin/which -s git" + raise "Please `brew install git` first" unless which_s "git" raise "Please `brew update' first" unless (HOMEBREW_REPOSITORY/".git").directory? raise FormulaUnspecifiedError if ARGV.named.empty? |
