mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
refactor: add error handler
This commit is contained in:
+5
-2
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user