1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

GHA: fail early if mport did not complete the install step

MidnightBSD's `mport install` is prone to return a non-zero exit code on
success (hence the need to use `|| true`; also unrelated to the `grep`
filtering, needed to avoid log noise for no built-in option for this).
Work around by verifying success explicitly, so that a truly failed
install command fails in the 'install prereqs' step, instead of raising
a confusing error (e.g. "cmake: not found") in the step after.

Follow-up to b7f4e55c8f #2120
Follow-up to e4f700e934 #1948

Closes #2663
This commit is contained in:
Viktor Szakats
2026-10-07 20:28:02 +02:00
parent 232c9516ff
commit 18aebe0896

View File

@@ -1247,6 +1247,11 @@ jobs:
sudo pkg install -y ${MATRIX_INSTALL}
elif [ "${MATRIX_OS}" = 'midnightbsd' ]; then
sudo mport install ${MATRIX_INSTALL} | grep -v -E '(Downloading.+%|^/usr/local)' || true
if [ "${MATRIX_BUILD}" = 'CM' ]; then
command -v cmake >/dev/null 2>&1
else
command -v make >/dev/null 2>&1
fi
elif [ "${MATRIX_OS}" = 'netbsd' ]; then
sudo pkgin -y install ${MATRIX_INSTALL}
elif [ "${MATRIX_OS}" = 'openbsd' ]; then