lib/bundler/source/git.rb in bundler-1.6.3 vs lib/bundler/source/git.rb in bundler-1.6.4
- old
+ new
@@ -77,14 +77,15 @@
# checkout of the git repository. When using local git
# repos, this is set to the local repo.
def install_path
@install_path ||= begin
git_scope = "#{base_name}-#{shortref_for_path(revision)}"
+ path = Bundler.install_path.join(git_scope)
- if Bundler.requires_sudo?
+ if !path.exist? && Bundler.requires_sudo?
Bundler.user_bundle_path.join(Bundler.ruby_scope).join(git_scope)
else
- Bundler.install_path.join(git_scope)
+ path
end
end
end
alias :path :install_path