Skip to content

Commit

Permalink
fix: remove duplicate config init
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.
  • Loading branch information
wilkice committed Dec 10, 2024
1 parent 7935b48 commit 7ad9cc0
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 7ad9cc0

Please sign in to comment.