diff --git a/misc/tools.func b/misc/tools.func index 7c30afda8..38b5a7b07 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -8262,9 +8262,16 @@ function setup_yq() { msg_info "Setup yq $LATEST_VERSION" fi - local yq_arch - case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in - arm64) yq_arch="arm64" ;; + local yq_arch detected_arch + if command -v dpkg &>/dev/null; then + detected_arch="$(dpkg --print-architecture 2>/dev/null)" + else + detected_arch="$(uname -m 2>/dev/null)" + fi + + case "$detected_arch" in + arm64 | aarch64) yq_arch="arm64" ;; + amd64 | x86_64) yq_arch="amd64" ;; *) yq_arch="amd64" ;; esac if ! curl_with_retry "https://github.com/${GITHUB_REPO}/releases/download/v${LATEST_VERSION}/yq_linux_${yq_arch}" "$TMP_DIR/yq"; then