projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90d0cdf
)
commands: Add hint when dir not empty
author
reuben honigwachs
<reuben@honigwachs.de>
Mon, 11 Nov 2019 20:38:10 +0000
(22:38 +0200)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Mon, 11 Nov 2019 20:38:10 +0000
(21:38 +0100)
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.
commands/new_site.go
patch
|
blob
|
history
diff --git
a/commands/new_site.go
b/commands/new_site.go
index 6d1677e22d6790ba2bb8871f3de0539e0141fc62..f884a6433f18f42f10a4f2691c0e852bbfc491b8 100644
(file)
--- 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))