From: reuben honigwachs Date: Mon, 11 Nov 2019 20:38:10 +0000 (+0200) Subject: commands: Add hint when dir not empty X-Git-Tag: v0.60.0~43 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1a36ce9b0903e02a5068aed5f807ed9d21f48ece;p=brevno-suite%2Fhugo 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. --- diff --git a/commands/new_site.go b/commands/new_site.go index 6d1677e2..f884a643 100644 --- a/commands/new_site.go +++ b/commands/new_site.go @@ -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))