Add || true to fix __invocation with no arguments (#102)

This commit is contained in:
Gabriel A. Devenyi 2018-06-26 09:55:16 -04:00 committed by Kevin van Zonneveld
parent 327cba75c9
commit 2048e4303e

View File

@ -47,7 +47,7 @@ fi
__dir="$(cd "$(dirname "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")"
__base="$(basename "${__file}" .sh)"
__invocation="$(printf %q "${__file}")$((($#)) && printf ' %q' "$@")"
__invocation="$(printf %q "${__file}")$((($#)) && printf ' %q' "$@" || true)"
# Define the environment variables (and their defaults) that this script depends on
LOG_LEVEL="${LOG_LEVEL:-6}" # 7 = debug -> 0 = emergency