summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext/ext_conf_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/ext/ext_conf_builder.rb')
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb
index 59e243b972..b6dde01950 100644
--- a/lib/rubygems/ext/ext_conf_builder.rb
+++ b/lib/rubygems/ext/ext_conf_builder.rb
@@ -48,9 +48,11 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
run cmd, results
ensure
if File.exist? 'mkmf.log'
- results << "To see why this extension failed to compile, please check" \
- " the mkmf.log which can be found here:\n"
- results << " " + File.join(dest_path, 'mkmf.log') + "\n"
+ unless $?.success? then
+ results << "To see why this extension failed to compile, please check" \
+ " the mkmf.log which can be found here:\n"
+ results << " " + File.join(dest_path, 'mkmf.log') + "\n"
+ end
FileUtils.mv 'mkmf.log', dest_path
end
siteconf.unlink