diff options
author | Anthony Fok <foka@debian.org> | 2015-11-28 07:42:40 -0700 |
---|---|---|
committer | Anthony Fok <foka@debian.org> | 2015-12-19 06:08:01 -0700 |
commit | e1af7cb9d06933f593661c498ed2f05a21286e87 (patch) | |
tree | 7d826cb1e76334eaa05f21f51d2fb7b89aa78915 /commands/gendoc.go | |
parent | de82404d35bc0673ca4fe5c400945b3fc4e9aae2 (diff) |
Use MkdirAll instead of Mkdir in `hugo gen doc`
Also print a feedback if the path does not exist and needs to be created.
Diffstat (limited to 'commands/gendoc.go')
-rw-r--r-- | commands/gendoc.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/gendoc.go b/commands/gendoc.go index 563208312..eaea51a93 100644 --- a/commands/gendoc.go +++ b/commands/gendoc.go @@ -50,7 +50,8 @@ for rendering in Hugo.`, gendocdir += helpers.FilePathSeparator } if found, _ := helpers.Exists(gendocdir, hugofs.OsFs); !found { - hugofs.OsFs.Mkdir(gendocdir, 0777) + jww.FEEDBACK.Println("Directory", gendocdir, "does not exist, creating...") + hugofs.OsFs.MkdirAll(gendocdir, 0777) } now := time.Now().Format(time.RFC3339) prepender := func(filename string) string { |