1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

5 Commits

Author SHA1 Message Date
3f0f7eed68 Improve error handling in commands
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.

This commit introduces that by changing all the command funcs to `RunE`:

* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)

Fixes #1502
2015-12-02 07:07:05 -07:00
666ddd2377 Enable dirname and filename completion for more flags
These flags are:

 * --source (-s), --cacheDir, --destination (-d) and --logFile
 * --completionfile and --dir.
2015-12-02 02:24:49 -07:00
50b5d0af29 Support setting target directory in hugo gen man
Fixes #1627
2015-11-28 07:32:02 -07:00
3d09de8910 Restructure the gen commands
Fixes #1603
2015-11-23 16:51:12 +01:00
098a0c819a Add commands/genman.go to autogenerate man pages
Fixes #1369
2015-11-22 18:54:44 +01:00