diff options
| author | Misty De Meo | 2013-05-20 19:35:07 -0500 |
|---|---|---|
| committer | Misty De Meo | 2013-05-20 23:25:15 -0500 |
| commit | 4fdbb2d685d1c20e84d1d31bc50f638aa1a800e1 (patch) | |
| tree | 92db9a493393ad657ee0293fc7a520352ce03200 /Library/Homebrew/compilers.rb | |
| parent | c9ce32d0f1ac550a25153b376c6584e5d7004a85 (diff) | |
| download | brew-4fdbb2d685d1c20e84d1d31bc50f638aa1a800e1.tar.bz2 | |
CompilerSelector: raise when no compatible compiler
This replaces the old behaviour of falling back to the original
compiler with no messaging.
Fixes Homebrew/homebrew#19170.
Fixes mistydemeo/tigerbrew#45.
Diffstat (limited to 'Library/Homebrew/compilers.rb')
| -rw-r--r-- | Library/Homebrew/compilers.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index b871e1aeb..37ce6cdb2 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -53,11 +53,18 @@ class CompilerSelector end end + # Attempts to select an appropriate alternate compiler, but + # if none can be found raises CompilerError instead def compiler begin cc = @compilers.pop end while @f.fails_with?(cc) - cc.nil? ? @old_compiler : cc.name + + if cc.nil? + raise CompilerSelectionError + else + cc.name + end end private |
