Skip to content

Commit

Permalink
fix: load features from config (#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
slntopp authored Oct 15, 2024
1 parent 5188404 commit 2b75fec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ const (

// Init initializes and loads the mondoo config
func Init(rootCmd *cobra.Command) {
cobra.OnInitialize(InitViperConfig)
Features = getFeatures()
cobra.OnInitialize(InitViperConfig, func() {
Features = getFeatures()
})
// persistent flags are global for the application
rootCmd.PersistentFlags().StringVar(&UserProvidedPath, "config", "", "Set config file path (default $HOME/.config/mondoo/mondoo.yml)")
}
Expand Down

0 comments on commit 2b75fec

Please sign in to comment.