diff --git a/src/cmd/utils/author_file_utils.go b/src/cmd/utils/author_file_utils.go index e8ebe05..059b9d0 100644 --- a/src/cmd/utils/author_file_utils.go +++ b/src/cmd/utils/author_file_utils.go @@ -14,27 +14,26 @@ import ( // An example of the author file can be found in the examples folder of the repo func Find_authorfile() string { var file string - - if os.Getenv("author_file") == "" { - if ConfigVar == nil { - cfg, _ := LoadConfig() - if cfg == nil { - // mimic the default config structure - cfg = &Config{ - Settings: struct { - AuthorFile string `mapstructure:"author_file"` - StartingScope string `mapstructure:"starting_scope"` - Editor string `mapstructure:"editor"` - }{ - AuthorFile: "", - StartingScope: "git", - Editor: "built-in", - }, - } - cfg.SetGlobalConfig() + if ConfigVar == nil { + cfg, _ := LoadConfig() + if cfg == nil { + // mimic the default config structure + cfg = &Config{ + Settings: struct { + AuthorFile string `mapstructure:"author_file"` + StartingScope string `mapstructure:"starting_scope"` + Editor string `mapstructure:"editor"` + }{ + AuthorFile: "", + StartingScope: "git", + Editor: "built-in", + }, } } + cfg.SetGlobalConfig() + } + if os.Getenv("author_file") == "" { if ConfigVar.Settings.AuthorFile != "" { file = ConfigVar.Settings.AuthorFile } else if os.Getenv("author_file") != "" {