From c2793e7a5ea931a77e119e593204a79c06870e53 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 3 Jun 2024 08:26:04 +0100 Subject: [PATCH] badcmd: don't print "no context given" Signed-off-by: Leah Rowe --- include/lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/lib.sh b/include/lib.sh index 68e36021..5ae34818 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -17,12 +17,12 @@ err="err_" badcmd() { - errmsg="no context given" - [ $# -gt 0 ] && errmsg="$1" + errmsg="Bad command" + [ $# -gt 0 ] && errmsg="Bad command ($1)" dstr="See $projectname build system docs: ${projectsite}docs/maintain/" [ -d "docs" ] && dstr="$dstr (local docs available via docs/)" - $err "Bad command ($errmsg). $dstr" + $err "$errmsg. $dstr" } err_() {