summaryrefslogtreecommitdiff
path: root/lib/bundler/source/git.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r--lib/bundler/source/git.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index eb605771f4..fd8f6debea 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -211,11 +211,11 @@ module Bundler
@cache_path ||= begin
git_scope = "#{base_name}-#{uri_hash}"
- if Bundler.requires_sudo?
- Bundler.user_bundle_path.join("cache/git", git_scope)
+ if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache?
+ Bundler.user_cache
else
- Bundler.cache.join("git", git_scope)
- end
+ Bundler.bundle_path.join("cache", "bundler")
+ end.join("git", git_scope)
end
end