diff options
author | Carl Lerche <carllerche@mac.com> | 2010-08-05 15:45:51 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-08-05 15:45:51 -0700 |
commit | ae53be1f8748bfc41bc6565dc4922a1c0ac80998 (patch) | |
tree | 0336ff9551959f232b71fa2d3fbebd74ee3e9f3a | |
parent | a4437da475a0014d6349ba033aa19b44801708f2 (diff) | |
download | bundler-ae53be1f8748bfc41bc6565dc4922a1c0ac80998.tar.gz |
cache_path is the incorrect thing to check here.
-rw-r--r-- | lib/bundler/source.rb | 7 | ||||
-rw-r--r-- | spec/runtime/setup_spec.rb | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index b5d8c06510..040403f699 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -553,10 +553,9 @@ module Bundler end def load_spec_files - return super if cache_path.exist? - raise PathError - rescue PathError - raise PathError, "#{to_s} is not checked out. Please run `bundle install`" + super + rescue PathError, GitError + raise GitError, "#{to_s} is not checked out. Please run `bundle install`" end private diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 9e3dfdac36..271a75f5cd 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -235,6 +235,12 @@ describe "Bundler.setup" do err.should_not include "This is not the git you are looking for" end + + it "works even when the cache directory has been deleted" do + bundle "install vendor" + FileUtils.rm_rf vendored_gems('cache') + should_be_installed "rack 1.0.0" + end end describe "when excluding groups" do |