Skip to content

Commit

Permalink
pass command line args (flyteorg#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanburns authored Apr 13, 2020
1 parent 89406fb commit 0aab1bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/controller/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ func init() {
rootCmd.AddCommand(viper.GetConfigCommand())
}

func initConfig(_ *cobra.Command, _ []string) error {
func initConfig(cmd *cobra.Command, _ []string) error {
configAccessor = viper.NewAccessor(config.Options{
StrictMode: true,
SearchPaths: []string{cfgFile},
})

configAccessor.InitializePflags(cmd.Flags())

err := configAccessor.UpdateConfig(context.TODO())
if err != nil {
return err
Expand Down

0 comments on commit 0aab1bc

Please sign in to comment.