diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-04 16:28:22 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-04 16:28:22 +0100 |
commit | 61e5fd1a0b2791b2819a5d0e58fa76208a4e8774 (patch) | |
tree | 8a2ad7afb3e8aa65f13c695b591972acf8fe4d53 | |
parent | 4020fb432805cfc7ebd243b0873574f25182ba40 (diff) |
lib.sh: Add warning if x_ is called without args
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/lib.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/lib.sh b/include/lib.sh index e7b5bd3d..fbbb92da 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -169,6 +169,7 @@ find_ex() x_() { + [ $# -lt 1 ] && printf "WARNING: x_ called without arguments\n" 1>&2 [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(echo "$@")" [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(echo "$@")"; : } |