summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 09:36:12 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 09:36:12 (EST)
commit00b51a0659bc5ac7fb2e5898172f2e4b90a2b104 (patch)
tree79d3a6261849e5739a016bf66461c436e93ca5fd
parentf47b3b16676ec60d37cd6614b53844ebc26aad61 (diff)
main(): Switch to non-exiting error()
-rw-r--r--src/main.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.sh b/src/main.sh
index dae02d0..e034104 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -66,7 +66,12 @@ main()
case "${cmd}" in
'help'|'version') ;;
- *) check_uid || error 1 "$(get_msg 'uid_0_req')";;
+ *)
+ if ! check_uid; then
+ error "$(get_msg 'uid_0_req')"
+ return 1
+ fi
+ ;;
esac
run_cmd "${cmd}" "${@}"