diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/global.rb | 2 | ||||
| -rwxr-xr-x | Library/brew.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 186628f5b..0f93a5d6f 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -479,10 +479,10 @@ class << ENV EOS end - elsif `/usr/bin/which gfortran`.chuzzle + elsif which 'gfortran' ohai "Using Homebrew-provided fortran compiler." puts "This may be changed by setting the FC environment variable." - self['FC'] = `/usr/bin/which gfortran`.chomp + self['FC'] = which 'gfortran' self['F77'] = self['FC'] fc_flag_vars.each {|key| self[key] = cflags} diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 761dd1eb7..2ae186c82 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -46,7 +46,7 @@ undef cache # we use a function to prevent adding home_cache to the global scope HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE+"Formula" if not defined? HOMEBREW_BREW_FILE - HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] || `which brew`.chomp + HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] || which('brew').to_s end HOMEBREW_PREFIX = Pathname.new(HOMEBREW_BREW_FILE).dirname.parent # Where we link under diff --git a/Library/brew.rb b/Library/brew.rb index b6ebf9145..f60d3d426 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -91,7 +91,7 @@ begin ENV["HOMEBREW_#{e}"] = Object.const_get "HOMEBREW_#{e}" end exec "brew-#{cmd}", *ARGV - elsif require? `/usr/bin/which brew-#{cmd}.rb` + elsif require? which("brew-#{cmd}.rb").to_s exit 0 else onoe "Unknown command: #{cmd}" |
