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 committed Jan 21, 2021
1 parent 754079c commit 78cc1e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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 78cc1e4

Please sign in to comment.