diff options
author | reuben honigwachs <[email protected]> | 2019-11-11 22:38:10 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-11-11 21:38:10 +0100 |
commit | 1a36ce9b0903e02a5068aed5f807ed9d21f48ece (patch) | |
tree | 2b687f23f2e1c78cb2b76fe34e4264de7bc51d68 /commands | |
parent | 90d0cdf236b54000bfe444ba3a00236faaa28790 (diff) | |
download | hugo-1a36ce9b0903e02a5068aed5f807ed9d21f48ece.tar.gz hugo-1a36ce9b0903e02a5068aed5f807ed9d21f48ece.zip |
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.
Diffstat (limited to 'commands')
-rw-r--r-- | commands/new_site.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/new_site.go b/commands/new_site.go index 6d1677e22..f884a6433 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)) |