mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
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 <ssheribe@redhat.com>
This commit is contained in:
parent
a31cde1224
commit
496bc10de2
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user