diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-09-05 09:15:30 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-09-05 14:37:12 +0900 |
commit | 3eca1e438db6fabaa7cd5e5a7120da147ac0ec26 (patch) | |
tree | 597be042af7d0052616ba41bb9d0b8d8ceedd094 /lib/bundler/source/git.rb | |
parent | 3767c6a90d8970f9b39e9ed116a7b9bbac3f9f26 (diff) | |
download | ruby-3eca1e438db6fabaa7cd5e5a7120da147ac0ec26.tar.gz |
Merge https://github.com/rubygems/rubygems/commit/16c3535413afebcdbab7582c6017c27b5da8a8dc
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index ed66dcdc12..fd34edffb7 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -102,13 +102,7 @@ module Bundler @install_path ||= begin git_scope = "#{base_name}-#{shortref_for_path(revision)}" - path = Bundler.install_path.join(git_scope) - - if !path.exist? && Bundler.requires_sudo? - Bundler.user_bundle_path.join(Bundler.ruby_scope).join(git_scope) - else - path - end + Bundler.install_path.join(git_scope) end end @@ -219,7 +213,7 @@ module Bundler # across different projects, this cache will be shared. # When using local git repos, this is set to the local repo. def cache_path - @cache_path ||= if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache? + @cache_path ||= if Bundler.feature_flag.global_gem_cache? Bundler.user_cache else Bundler.bundle_path.join("cache", "bundler") |