Fix dying on what should be nonlethal errors

This commit is contained in:
Salt 2020-01-23 14:32:49 -06:00
parent 23d388c141
commit bc414f08d8

3
ptgdp
View File

@ -69,7 +69,8 @@ error() {
else
printf "ERROR: %s\\n" "$1" 1>&2
fi
[ -n "$2" ] && exit "${2:-1}"
[ -z "$2" ] && return
exit "${2:-1}"
}
has() {
# Parse out all arguments and try to find them in path