Skip to content

Commit f5b38d0

Browse files
authored
Merge pull request #7 from alanEG/revert-5-alanEG-patch-4
Revert "Update logger.go"
2 parents ccdec8f + bf60dbf commit f5b38d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

logger.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ func logger(typeLog, Flag, message, reason interface{}, errorRange int) {
2121
case "success":
2222
fmt.Fprintf(os.Stderr, "%s %s\n", yellow(Flag), message)
2323
case "error":
24-
if reason != nil {
24+
if reason != "" {
2525
fmt.Fprintf(os.Stderr, "%s %s\n", red("[Error]"), message)
2626
fmt.Fprintf(os.Stderr, "Reason: %s\n", reason)
2727
} else {
2828
fmt.Fprintf(os.Stderr, "%s %s\n", red("[Error]"), message)
2929
}
3030
if errorRange == 1 {
3131
os.Exit(0)
32+
if errorRange == 1 {
33+
os.Exit(0)
34+
}
3235
}
3336
}
3437
}

0 commit comments

Comments
 (0)