diff options
Diffstat (limited to 'commands/list_config.go')
-rw-r--r-- | commands/list_config.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/commands/list_config.go b/commands/list_config.go index c04cb66be..f47f6e144 100644 --- a/commands/list_config.go +++ b/commands/list_config.go @@ -29,15 +29,17 @@ var configCmd = &cobra.Command{ } func init() { - configCmd.RunE = config + configCmd.RunE = printConfig } -func config(cmd *cobra.Command, args []string) error { - if _, err := InitializeConfig(configCmd); err != nil { +func printConfig(cmd *cobra.Command, args []string) error { + cfg, err := InitializeConfig(configCmd) + + if err != nil { return err } - allSettings := viper.AllSettings() + allSettings := cfg.Cfg.(*viper.Viper).AllSettings() var separator string if allSettings["metadataformat"] == "toml" { |