From 68d6eeb8e72ee04f98dba24aa778761f869b9432 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 14 Apr 2019 13:45:51 -0400 Subject: main(): Fix return with set -e --- diff --git a/src/main.sh b/src/main.sh index 8e19665..f50cad4 100644 --- a/src/main.sh +++ b/src/main.sh @@ -59,7 +59,6 @@ _get_options() main() { local cmd= - local status= if [ -f "$(dirname -- "${0}")/.builddirstamp" ]; then in_place=true @@ -88,10 +87,11 @@ main() shift 1 fi - run_cmd "${cmd}" "${@}" - status=${?} - - return ${status} + if run_cmd "${cmd}" "${@}"; then + return 0 + else + return ${?} + fi } _lock() -- cgit v0.9.1