From 1de1b5b25b24acdc2c746e5a5ce15d1f2db99754 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Tue, 29 Nov 2022 22:02:55 +0800 Subject: [PATCH] common.sh: post_log and post_beacon will check #args --- tools/common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/common.sh b/tools/common.sh index 152ea16..91c81cf 100755 --- a/tools/common.sh +++ b/tools/common.sh @@ -148,6 +148,7 @@ ask_for_Yn() post_log() { + test $# -eq 3 || fmt_fatal "usage: post_log
" "${DOTFILES}/tools/logger.sh" "log" "[$1][$2] $3" } @@ -158,6 +159,7 @@ apost_log() post_beacon() { + test $# -eq 1 || fmt_fatal "usage: post_beacon " "${DOTFILES}/tools/logger.sh" "beacon" "$1" }