diff options
Diffstat (limited to 'lib/rubygems/package.rb')
| -rw-r--r-- | lib/rubygems/package.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb index d36b6dfb5e..7e41b18f66 100644 --- a/lib/rubygems/package.rb +++ b/lib/rubygems/package.rb @@ -743,9 +743,11 @@ EOM if Gem.win_platform? # Create a symlink and fallback to copy the file or directory on Windows, # where symlink creation needs special privileges in form of the Developer Mode. + # JRuby on Windows raises TypeError from the wincode path-conversion helper + # when it cannot create the symlink, so fall back to copy in that case too. def create_symlink(old_name, new_name) File.symlink(old_name, new_name) - rescue Errno::EACCES + rescue Errno::EACCES, TypeError from = File.expand_path(old_name, File.dirname(new_name)) FileUtils.cp_r(from, new_name) end |
