From 496bc10de29b889a44ca0baba970a6cb3270f624 Mon Sep 17 00:00:00 2001 From: Snir Sheriber Date: Thu, 3 Feb 2022 15:17:06 +0200 Subject: [PATCH] tools: check for yq before using it as get_from_kata_deps may be called from scripts that does not install_yq Signed-off-by: Snir Sheriber --- tools/packaging/scripts/lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/packaging/scripts/lib.sh b/tools/packaging/scripts/lib.sh index 1ed7b5003..8f4ba5e1c 100644 --- a/tools/packaging/scripts/lib.sh +++ b/tools/packaging/scripts/lib.sh @@ -36,6 +36,7 @@ get_from_kata_deps() { local dependency="$1" versions_file="${this_script_dir}/../../../versions.yaml" + command -v yq &> /dev/null || die 'yq command is not in your $PATH' result=$("yq" read -X "$versions_file" "$dependency") [ "$result" = "null" ] && result="" echo "$result"