refactor: add error handler

This commit is contained in:
Slug-Boi
2025-04-09 22:35:52 +02:00
parent c8923525ea
commit ee14a9f141
+5 -2
View File
@@ -139,11 +139,14 @@ func Execute() {
check_update() check_update()
// author file check // author file check
author_file := utils.CheckAuthorFile() author_file, err := utils.CheckAuthorFile(os.Stdin, os.Stdout)
if err != nil {
panic(fmt.Sprintf("Error checking author file: %v", err))
}
// define users // define users
utils.Define_users(author_file) utils.Define_users(author_file)
err := rootCmd.Execute() err = rootCmd.Execute()
if err != nil { if err != nil {
os.Exit(1) os.Exit(1)
} }