Skip to content

Commit

Permalink
Pass command-line arguments (flyteorg#193)
Browse files Browse the repository at this point in the history
* Pass command line args
  • Loading branch information
yindia authored Jan 21, 2021
1 parent 351ab2e commit 288937e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flytepropeller/cmd/controller/cmd/root.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,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 288937e

Please sign in to comment.