aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 946c2576c..e5ddb6502 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -132,7 +132,7 @@ module OS
def gcc_40_build_version
@gcc_40_build_version ||=
if (path = locate("gcc-4.0"))
- `#{path} --version`[/build (\d{4,})/, 1].to_i
+ `#{path} --version 2>/dev/null`[/build (\d{4,})/, 1].to_i
end
end
alias_method :gcc_4_0_build_version, :gcc_40_build_version
@@ -142,7 +142,7 @@ module OS
begin
gcc = MacOS.locate("gcc-4.2") || HOMEBREW_PREFIX.join("opt/apple-gcc42/bin/gcc-4.2")
if gcc.exist? && !gcc.realpath.basename.to_s.start_with?("llvm")
- `#{gcc} --version`[/build (\d{4,})/, 1].to_i
+ `#{gcc} --version 2>/dev/null`[/build (\d{4,})/, 1].to_i
end
end
end