1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2025-02-28 22:22:12 +00:00
hugo/hugolib
Bjørn Erik Pedersen 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 
2015-12-02 07:07:05 -07:00
..
author.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
benchmark_test.go
datafiles_test.go
handler_base.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_file.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_meta.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_page.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_test.go
hugo.go
media.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
menu.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
menu_test.go
node.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
page.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
page_permalink_test.go
page_taxonomy_test.go
page_test.go Export Page.Layout 2015-11-02 17:24:50 +01:00
page_time_integration_test.go
pageCache.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageCache_test.go
pageGroup.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageGroup_test.go Fix GroupByParam to return original param string 2015-11-10 14:57:03 +01:00
pageSort.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageSort_test.go
pagesPrevNext.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pagesPrevNext_test.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pagination.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pagination_test.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
path_separators_test.go Export Page.Layout 2015-11-02 17:24:50 +01:00
path_separators_windows_test.go
permalinks.go
permalinks_test.go
planner.go Export Page.Layout 2015-11-02 17:24:50 +01:00
redis.cn.md
rss_test.go
scratch.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
scratch_test.go Add map support to scratch 2015-08-02 17:23:36 +02:00
shortcode.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
shortcode_test.go Add shortcode IsNamedParams property 2015-11-23 17:17:18 +01:00
shortcodeparser.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
shortcodeparser_test.go
site.go Improve error handling in commands 2015-12-02 07:07:05 -07:00
site_show_plan_test.go
site_test.go Complete the Url-to-URL transition in tests 2015-09-13 05:21:24 -06:00
site_url_test.go
siteinfo_test.go
siteJSONEncode_test.go
sitemap.go
sitemap_test.go
summary.go
taxonomy.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
taxonomy_test.go