From 31f2b8bafc0464eb8e99beeff3f7dcbe5f2e49dd Mon Sep 17 00:00:00 2001 From: Emmanuel Frecon <9443924+efrecon@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:56:30 +0200 Subject: [PATCH] Check command is passed Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- lib/common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/common.sh b/lib/common.sh index c382d9f..110c7b6 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -67,6 +67,9 @@ check_command() { esac done shift $((OPTIND-1)) + if [ -z "$1" ]; then + error "No command specified for checking" + fi trace "Checking $1 is an accessible command" if ! command -v "$1" >/dev/null 2>&1; then if is_true "$_hard"; then