Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Recreate the install path when installing.

  • Loading branch information...
commit 36cc6c2b291371476b09137acf7018798f83ede3 1 parent c6feb8f
@yfeldblum yfeldblum authored
View
3  lib/librarian/action/install.rb
@@ -47,7 +47,8 @@ def cache_manifests(manifests)
end
def create_install_path
- install_path.mkpath unless install_path.exist?
+ install_path.rmtree if install_path.exist?
+ install_path.mkpath
end
def install_manifests(manifests)
View
5 spec/unit/action/install_spec.rb
@@ -94,13 +94,14 @@ module Librarian
end
end
- it "should not try to create the install path if it already exists" do
+ it "should recreate the install path if it already exists" do
action.stub(:sorted_manifests) { sorted_manifests }
action.stub(:cache_manifests)
action.stub(:install_manifests)
install_path.stub(:exist?) { true }
- install_path.should_not_receive(:mkpath)
+ install_path.should_receive(:rmtree)
+ install_path.should_receive(:mkpath)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.