diff options
| author | Mike McQuaid | 2017-03-17 15:57:30 +0200 |
|---|---|---|
| committer | GitHub | 2017-03-17 15:57:30 +0200 |
| commit | a9cd74de59f4825555efe0c161a62d6306a1b768 (patch) | |
| tree | 8a1f5ac4a87256aad33c810b2042c45d3e7dcf3a /Library | |
| parent | bfb5bf1d7007821c74de4252fe1ade5047e0ca3c (diff) | |
| parent | 31e5ed28d19c5d15d8c283bf4df726f9d11d2f7a (diff) | |
| download | brew-a9cd74de59f4825555efe0c161a62d6306a1b768.tar.bz2 | |
Merge pull request #2279 from sjackman/determine_path
determine_path: Fix tests FormulaUnavailableError
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/ENV/super.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 1a5f420f6..0935647f5 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -111,16 +111,16 @@ module Superenv # Homebrew's apple-gcc42 will be outside the PATH in superenv, # so xcrun may not be able to find it - case homebrew_cc - when "gcc-4.2" - begin - apple_gcc42 = Formulary.factory("apple-gcc42") - rescue FormulaUnavailableError + begin + case homebrew_cc + when "gcc-4.2" + paths << Formulary.factory("apple-gcc42").opt_bin + when GNU_GCC_REGEXP + paths << gcc_version_formula($&).opt_bin end - paths << apple_gcc42.opt_bin.to_s if apple_gcc42 - when GNU_GCC_REGEXP - gcc_formula = gcc_version_formula($&) - paths << gcc_formula.opt_bin.to_s + rescue FormulaUnavailableError + # Don't fail and don't add these formulae to the path if they don't exist. + nil end paths.to_path_s |
