mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 06:17:45 +00:00
Improve error message on new site command
This commit is contained in:
1 parent
5e97cf3020
commit
ab7223df8c
1 file changed
+1
-1
+1
-1
@@ -124,7 +124,7 @@ func doNewSite(basepath string, force bool) error {
|
|||||||
|
|
||||||
switch {
|
switch {
|
||||||
case !isEmpty && !force:
|
case !isEmpty && !force:
|
||||||
return errors.New(basepath + " already exists")
|
return errors.New(basepath + " already exists and is not empty")
|
||||||
|
|
||||||
case !isEmpty && force:
|
case !isEmpty && force:
|
||||||
all := append(dirs, filepath.Join(basepath, "config."+configFormat))
|
all := append(dirs, filepath.Join(basepath, "config."+configFormat))
|
||||||
|
|||||||
Reference in new issue
Block a user