We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8aee2eb commit 74dbf7cCopy full SHA for 74dbf7c
spec/integration/prune_spec.cr
@@ -36,4 +36,9 @@ describe "prune" do
36
Dir.cd(application_path) { run "shards prune" }
37
installed_dependencies.sort.should eq([".keep_hidden", "keep_not_hidden", "web"])
38
end
39
+
40
+ it "should not fail if the install directory does not exist" do
41
+ run "rm -rf #{install_path}"
42
+ Dir.cd(application_path) { run "shards prune" }
43
+ end
44
src/commands/prune.cr
@@ -6,7 +6,7 @@ module Shards
6
module Commands
7
class Prune < Command
8
def run
9
- return unless lockfile?
+ return unless lockfile? && Dir.exists?(Shards.install_path)
10
11
Dir.each_child(Shards.install_path) do |name|
12
path = File.join(Shards.install_path, name)
0 commit comments