summaryrefslogtreecommitdiffstats
path: root/commands/list_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/list_config.go')
-rw-r--r--commands/list_config.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/commands/list_config.go b/commands/list_config.go
index 9520fdbc9..d71d04a67 100644
--- a/commands/list_config.go
+++ b/commands/list_config.go
@@ -25,8 +25,11 @@ var config = &cobra.Command{
Use: "config",
Short: "Print the site configuration",
Long: `Print the site configuration, both default and custom settings.`,
- Run: func(cmd *cobra.Command, args []string) {
- InitializeConfig()
+ RunE: func(cmd *cobra.Command, args []string) error {
+ if err := InitializeConfig(); err != nil {
+ return err
+ }
+
allSettings := viper.AllSettings()
var separator string
@@ -49,5 +52,7 @@ var config = &cobra.Command{
fmt.Printf("%s%s%+v\n", k, separator, allSettings[k])
}
}
+
+ return nil
},
}