From 1b324cbefb8cd17fbbc26acb3092c8e47844a4b8 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 4 May 2025 16:28:22 +0100 Subject: lib.sh: Add warning if x_ is called without args Signed-off-by: Leah Rowe --- include/lib.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'include/lib.sh') 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 "$@")"; : } -- cgit v1.2.1