From b0591306f5eec51ad2450ede51f9257a44e2370f Mon Sep 17 00:00:00 2001 From: Slug-Boi Date: Tue, 17 Jun 2025 21:02:11 +0200 Subject: [PATCH] refactor: redudandant --- src/cmd/utils/author_file_utils.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cmd/utils/author_file_utils.go b/src/cmd/utils/author_file_utils.go index 059b9d0..a020dec 100644 --- a/src/cmd/utils/author_file_utils.go +++ b/src/cmd/utils/author_file_utils.go @@ -36,14 +36,11 @@ func Find_authorfile() string { if os.Getenv("author_file") == "" { if ConfigVar.Settings.AuthorFile != "" { file = ConfigVar.Settings.AuthorFile - } else if os.Getenv("author_file") != "" { - file = os.Getenv("author_file") } else { userconf, err :=os.UserConfigDir() if err != nil { panic(fmt.Sprintf("Error getting user config dir: %v", err)) - } - + } if _, err := os.Stat(userconf+"/cocommit/authors.json"); os.IsNotExist(err) { panic(fmt.Sprintf("No author file set, please set the author_file environment variable or create a config file using the command: cocommit config -c")) } else {