diff options
-rw-r--r-- | lib/bundler/source.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index 727bb5bb5c..747edf0925 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -313,11 +313,10 @@ module Bundler end def checkout - FileUtils.mkdir_p(path) + unless File.exist?(path + "/.git") + %x(git clone --no-checkout #{cache_path} #{path}) + end Dir.chdir(path) do - unless File.exist?(".git") - %x(git clone --no-checkout #{cache_path} #{path}) - end git "fetch --quiet" git "reset --hard #{revision}" end |