diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-28 23:46:47 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-28 23:46:47 +0000 |
commit | 934f537b458778f4786716c95b73fc72bc1ce256 (patch) | |
tree | 6abdecd9956995a7f82c9f969c80657b4301f6bd /lib/rubygems/ext/rake_builder.rb | |
parent | b511e1bfbe649b938e317e00ad1795f1b9623758 (diff) | |
download | ruby-934f537b458778f4786716c95b73fc72bc1ce256.tar.gz |
Import rubygems 1.5.0 (release candidate @ 09893d9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/ext/rake_builder.rb')
-rw-r--r-- | lib/rubygems/ext/rake_builder.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/rubygems/ext/rake_builder.rb b/lib/rubygems/ext/rake_builder.rb index d3b5cba75c..ba9fa8a94c 100644 --- a/lib/rubygems/ext/rake_builder.rb +++ b/lib/rubygems/ext/rake_builder.rb @@ -25,8 +25,16 @@ class Gem::Ext::RakeBuilder < Gem::Ext::Builder # Deal with possible spaces in the path, e.g. C:/Program Files dest_path = '"' + dest_path + '"' if dest_path.include?(' ') - cmd = ENV['rake'] || "\"#{Gem.ruby}\" -rubygems #{Gem.bin_path('rake')}" rescue Gem.default_exec_format % 'rake' - cmd += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen + rake = ENV['rake'] + + rake ||= begin + "\"#{Gem.ruby}\" -rubygems #{Gem.bin_path('rake')}" + rescue Gem::Exception + end + + rake ||= Gem.default_exec_format % 'rake' + + cmd = "#{rake} RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen run cmd, results |