fix(install-yq): ensure version check failure aborts script
Install yq / install-yq (ubuntu-latest-amd64, amd64, linux) (push) Successful in 8s
Install yq / install-yq (ubuntu-latest-arm64, arm64, linux) (push) Successful in 10s
Markdown linter / markdown-link-checker (push) Successful in 24s
Markdown linter / markdown-lint (push) Successful in 32s

Move the yq binary version check out of the echo command substitution
into a standalone variable assignment. With set -e, a failed command
inside $() as an argument to echo does not trigger errexit, silently
swallowing errors like "Exec format error". A separate assignment
correctly propagates the failure.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-08-16 21:11:27 +02:00
co-authored by Copilot
parent 97090c553c
commit 525214e9c8
+3 -1
View File
@@ -72,7 +72,9 @@ else
fi
chmod +x "${bin_path}"
echo "Installed yq version $(${bin_path} --version) in ${bin_path}"
yq_installed_version="$("${bin_path}" --version)"
echo "Installed ${yq_installed_version} in ${bin_path}"
# Ensure yq is in PATH for subsequent steps
if [[ -n "${GITHUB_PATH:-}" ]]; then