Skip to content

Commit

Permalink
load config from cli as well before applying dynamic config
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsukhani committed May 17, 2023
1 parent 18c4fe5 commit f9e2448
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/util/cfg/dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func DynamicUnmarshal(dst DynamicCloneable, args []string, fs *flag.FlagSet) err
// section of the config file by taking advantage of the code in ConfigFileLoader which will load
// and process the config file.
ConfigFileLoader(args, "config.file", true),
// Now load the flags again, this will supersede anything set from config file with flags from the command line.
Flags(args, fs),
// Apply any dynamic logic to set other defaults in the config. This function is called after parsing the
// config files so that values from a common, or shared, section can be used in
// the dynamic evaluation
Expand Down

0 comments on commit f9e2448

Please sign in to comment.