Skip to content

Commit 9436638

Browse files
author
openset
committed
Update: CheckErr
1 parent 4d25a28 commit 9436638

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/base/base.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ func getFilePath(filename string) string {
8989

9090
func CheckErr(err error) {
9191
if err != nil {
92-
panic(err)
92+
fmt.Println(err.Error())
93+
Exit()
9394
}
9495
}
9596

9697
func Exit() {
97-
os.Exit(0)
98+
os.Exit(1)
9899
}
99100

100101
func AuthInfo(cmd string) string {

0 commit comments

Comments
 (0)