Fix yq installation issue

This commit is contained in:
Hsy-Intel 2025-05-09 09:20:40 +08:00 committed by Tate, Hongliang Tian
parent da82ca619f
commit 7cd41349d1
2 changed files with 9 additions and 2 deletions

View File

@ -12,7 +12,7 @@ RUN apt update && apt-get install -y --no-install-recommends \
python-is-python3 \
wget
RUN pip3 install iq tomli
RUN pip3 install yq tomli
#= Build QEMU =================================================================

View File

@ -6,7 +6,14 @@ set -e
set -o pipefail
# Ensure all dependencies are installed
command -v yq >/dev/null 2>&1 || command -v yq >/dev/null 2>&1 || { echo >&2 "tools are not installed. Aborting."; exit 1; }
if ! command -v yq >/dev/null 2>&1; then
echo >&2 "Error: missing required tool: yq"
exit 1
fi
if ! command -v jq >/dev/null 2>&1; then
echo >&2 "Error: missing required tool: jq"
exit 1
fi
# Set up paths
BENCHMARK_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"