summaryrefslogtreecommitdiffstats
path: root/commands/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/check.go')
-rw-r--r--commands/check.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/commands/check.go b/commands/check.go
index 0c8b3ba79..f17602246 100644
--- a/commands/check.go
+++ b/commands/check.go
@@ -23,9 +23,13 @@ var check = &cobra.Command{
Short: "Check content in the source directory",
Long: `Hugo will perform some basic analysis on the content provided
and will give feedback.`,
- Run: func(cmd *cobra.Command, args []string) {
- InitializeConfig()
+ RunE: func(cmd *cobra.Command, args []string) error {
+ if err := InitializeConfig(); err != nil {
+ return err
+ }
site := hugolib.Site{}
- site.Analyze()
+
+ return site.Analyze()
+
},
}