Skip to content

Commit

Permalink
fix: remove duplicate config init (#1626)
Browse files Browse the repository at this point in the history
1. there is `cobra.OnInitialize(initConfig)` in function `init` to do the configure init process
2. call of `initConfig` in this line makes no sense, as the `cfgFile` is blank at this time.

Co-authored-by: Anna Lushnikova <[email protected]>
  • Loading branch information
wilkice and loosla authored Dec 12, 2024
1 parent 0022e58 commit 2ec5fba
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions commands/doit.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ var (
func init() {
var cfgFile string

initConfig()

rootPFlagSet := DoitCmd.PersistentFlags()
rootPFlagSet.StringVarP(&cfgFile, "config", "c",
filepath.Join(defaultConfigHome(), defaultConfigName), "Specify a custom config file")
Expand Down

0 comments on commit 2ec5fba

Please sign in to comment.