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 #1502
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 permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
datafiles_test.go Do not fail on unknown files in /data 2015-04-22 18:35:56 +02:00
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 Adding default handler & tests Fixes #147 2015-05-20 18:55:24 -04:00
hugo.go Refactor Hugo version 2015-03-18 12:23:13 +01:00
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 fix TestHomeNodeMenu test 2015-07-14 21:31:47 +02:00
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 Support Fish and Chips section 2015-05-28 23:05:17 +02:00
page_taxonomy_test.go hugolib: make Page implement the ReaderFrom interface 2015-04-03 21:41:24 +02:00
page_test.go Export Page.Layout 2015-11-02 17:24:50 +01:00
page_time_integration_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
pageCache.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageCache_test.go Fix data races in sorting and Reverse 2015-07-23 12:43:57 +02:00
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 Fix sort test and title sort 2015-07-25 17:22:46 +02:00
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 Update test logs for uniformity and consistency 2015-05-08 22:27:00 -04:00
permalinks.go Fix UTF8 permalink 2015-05-17 14:54:59 +02:00
permalinks_test.go Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
planner.go Export Page.Layout 2015-11-02 17:24:50 +01:00
redis.cn.md [Docs] Copyediting 2015-01-28 18:02:40 -07:00
rss_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
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 Apply gofmt -s 2015-03-05 23:57:38 +01:00
site.go Improve error handling in commands 2015-12-02 07:07:05 -07:00
site_show_plan_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
site_test.go Complete the Url-to-URL transition in tests 2015-09-13 05:21:24 -06:00
site_url_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
siteinfo_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
siteJSONEncode_test.go Silence chatty JSON test 2015-06-06 20:57:13 +02:00
sitemap.go Add Sitemaps config values handling 2014-05-09 23:11:33 -04:00
sitemap_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
summary.go Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
taxonomy.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
taxonomy_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00