summaryrefslogtreecommitdiffstats
path: root/external/perl/MODULES.txt
blob: 799357f4d1c24d0675ac0214da2afa280cf40e8d (plain)
1
Text-Template-1.56/lib
5cf3c54002bce74'>treecommitdiffstats
path: root/commands/new.go
diff options
context:
space:
mode:
authorspf13 <steve.francia@gmail.com>2014-05-19 09:16:40 -0400
committerspf13 <steve.francia@gmail.com>2014-05-19 09:16:40 -0400
commit6b8244ba67cede0c2c95bde695cf3c54002bce74 (patch)
tree4dc39641bf8b6ca423c21174bf424399968f36fd /commands/new.go
parentdf4bbcef30250f6bd22e38ee2dc3314f2c786f20 (diff)
new site works in an empty directory now
Diffstat (limited to 'commands/new.go')
-rw-r--r--commands/new.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/commands/new.go b/commands/new.go
index 1c3e8e9e5..68ddbb4f6 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -110,7 +110,12 @@ func NewSite(cmd *cobra.Command, args []string) {
}
if x, _ := helpers.Exists(createpath); x {
- jww.FATAL.Fatalln(createpath, "already exists")
+ y, _ := helpers.IsDir(createpath)
+ if z, _ := helpers.IsEmpty(createpath); y && z {
+ jww.INFO.Println(createpath, "already exists and is empty")
+ } else {
+ jww.FATAL.Fatalln(createpath, "already exists and is not empty")
+ }
}
mkdir(createpath, "layouts")