summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCharlotte Koch <charlotte@magentastripe.com>2024-06-27 10:25:32 -0700
committerCharlotte Koch <charlotte@magentastripe.com>2024-06-27 10:25:32 -0700
commitbaa05f4d9417231c7953e0e8d13f199066e94839 (patch)
treed80737da439f60424d96c06552963f80287cea9e /bin
parent6993b4b9a9794fb3132309dc8eee2eed4227c98d (diff)
Don't create destination dir if it already exists
Diffstat (limited to 'bin')
-rwxr-xr-xbin/willora5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/willora b/bin/willora
index 9652aa7..a97f2b8 100755
--- a/bin/willora
+++ b/bin/willora
@@ -64,6 +64,11 @@ class Willora
return 1
end
+ if File.exists?(@opts[:destination])
+ @errormsg = "Destination directory already exists: #{@opts[:destination].inspect}"
+ return 1
+ end
+
# Fill in some gaps before we continue.
if !@opts[:nickname]
@errormsg = "New project requires a nickname"