Skip to content

Commit 3c29869

Browse files
committed
[fix] : Fixed message exit code
1 parent d0b6442 commit 3c29869

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,15 @@ msg_warn() { msg_common warn "${@}"; }
6060
# Show an debug message
6161
# ${1}: message string
6262
msg_debug() {
63-
[[ "${debug}" = true ]] && msg_common debug "${@}"
64-
return 0
63+
[[ "${debug}" = true ]] && msg_common debug "${@}" || return 0
6564
}
6665

6766
# Show an ERROR message then exit with status
6867
# ${1}: message string
6968
# ${2}: exit code number (with 0 does not exit)
7069
msg_error() {
7170
msg_common error "${1}"
72-
[[ -n "${2:-}" ]] && exit "${2}"
71+
[[ -n "${2:-""}" ]] && exit "${2}" || return 0
7372
}
7473

7574

0 commit comments

Comments
 (0)