diff options
| author | Misty De Meo | 2014-01-03 17:58:31 -0800 |
|---|---|---|
| committer | Misty De Meo | 2014-01-03 17:59:00 -0800 |
| commit | 97bb9c5b73f493ddff3556c7932f740cf39db113 (patch) | |
| tree | ba8057f07f2ffae94aa3876667ec7c447a07bd94 /Library/Homebrew/extend | |
| parent | 5413ebca53f3850cb532437bdf2ff01cc56e040b (diff) | |
| download | brew-97bb9c5b73f493ddff3556c7932f740cf39db113.tar.bz2 | |
stdenv: fix self.cc check
Since ENV.cc/cxx are accessors to ENV, any values being passed through
are coerced into strings, which means that a nil `ENV.cc` is actually
an empty string - which isn't considered to be false in Ruby.
Fixes mistydemeo/tigerbrew#161.
Fixes mistydemeo/tigerbrew#135.
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ENV/std.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index b9cbfbc68..84d3bea72 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -131,7 +131,7 @@ module Stdenv self.cc = MacOS.locate("gcc-4.2") self.cxx = MacOS.locate("g++-4.2") - unless cc + if cc.empty? self.cc = "#{HOMEBREW_PREFIX}/bin/gcc-4.2" self.cxx = "#{HOMEBREW_PREFIX}/bin/g++-4.2" raise "GCC could not be found" unless File.exist? cc |
