mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Improve error message on new site command
This commit is contained in:
@@ -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