Skip to content

Commit

Permalink
No need to overwrite path when there's a remote
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Jun 9, 2022
1 parent 04e6a5a commit d86fb2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bundler/lib/bundler/source/rubygems.rb
Expand Up @@ -168,15 +168,16 @@ def install(spec, options = {})
Bundler.rm_rf(path)
raise
end
else
path = cached_gem(spec)
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
end

unless Bundler.settings[:no_install]
message = "Installing #{version_message(spec, options[:previous_spec])}"
message += " with native extensions" if spec.extensions.any?
Bundler.ui.confirm message

path = cached_gem(spec)
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
if requires_sudo?
install_path = Bundler.tmp(spec.full_name)
bin_path = install_path.join("bin")
Expand Down

0 comments on commit d86fb2c

Please sign in to comment.