mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-26 14:21:18 +00:00
commands: Add hint when dir not empty
Many users seem to stumble over creating new sites in existing non-empty directories. And that `--force` is the necessary option. So I added *See --force* as a hint to the error. Fixes #4825.
This commit is contained in:
parent
90d0cdf236
commit
1a36ce9b09
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ func (n *newSiteCmd) doNewSite(fs *hugofs.Fs, basepath string, force bool) error
|
|||
|
||||
switch {
|
||||
case !isEmpty && !force:
|
||||
return errors.New(basepath + " already exists and is not empty")
|
||||
return errors.New(basepath + " already exists and is not empty. See --force.")
|
||||
|
||||
case !isEmpty && force:
|
||||
all := append(dirs, filepath.Join(basepath, "config."+n.configFormat))
|
||||
|
|
Loading…
Reference in a new issue