From 49ae843592650ca02b33c188cf2aff7aa78985d3 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Wed, 2 Nov 2022 14:21:04 +0000 Subject: [PATCH] ci: mostly prevent "-v/--version: not found" irrelevant error $CC, $WRAPPER_CMD and valgrind are not necessarily defined --- ci/cirrus.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/cirrus.sh b/ci/cirrus.sh index 23f7c6d0db08d..7dc15a406c34c 100755 --- a/ci/cirrus.sh +++ b/ci/cirrus.sh @@ -16,9 +16,16 @@ esac env >> test_env.log -$CC -v || true -valgrind --version || true -$WRAPPER_CMD --version || true +if [ -n "$CC" ]; then + # The MSVC compiler "cl" doesn't understand "-v" + $CC -v || true +fi +if [ "$WITH_VALGRIND" = "yes" ]; then + valgrind --version +fi +if [ -n "$WRAPPER_CMD" ]; then + $WRAPPER_CMD --version +fi ./autogen.sh