lib/bundler/source/git.rb in bundler-2.3.15 vs lib/bundler/source/git.rb in bundler-2.3.16

- old
+ new

@@ -217,16 +217,14 @@ # This is the path which is going to contain a cache # of the git repository. When using the same git repository # 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 ||= begin - if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache? - Bundler.user_cache - else - Bundler.bundle_path.join("cache", "bundler") - end.join("git", git_scope) - end + @cache_path ||= if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache? + Bundler.user_cache + else + Bundler.bundle_path.join("cache", "bundler") + end.join("git", git_scope) end def app_cache_dirname "#{base_name}-#{shortref_for_path(cached_revision || revision)}" end