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 | 0e1d52c0d3945ae0ac69383c7734e425b7fbf8f1 (patch) | |
| tree | 168dd799d6d4c3d1ec545d04082a7fe2cbe38aff /Library | |
| parent | e214004940cd1bf5414fe865e9c6905544aced62 (diff) | |
| download | homebrew-0e1d52c0d3945ae0ac69383c7734e425b7fbf8f1.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')
| -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 |
