refactor: small changes to exit and usage statement

This commit is contained in:
Slug-Boi
2024-10-31 21:32:34 +01:00
parent b1c4df81c8
commit d9431a5e5e
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -5,6 +5,7 @@ import (
"io"
"os"
"os/exec"
"strings"
)
func Cz_Call() string {
@@ -18,6 +19,10 @@ func Cz_Call() string {
err := cmd.Run()
if err != nil {
// if the user exits the commitizen command, exit the program
if strings.Contains(err.Error(), "exit status 8") {
os.Exit(0)
}
panic(fmt.Sprint(err))
}