From 58cb00c63facc572ffb93aa756773c149ec11041 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Aug 2023 09:03:59 +0200 Subject: [PATCH] github: check apt-cache in more robust way References: 3119a8060102ed7dd04d4a782932494c386f72a6 Signed-off-by: Karel Zak --- .github/workflows/cibuild-setup-ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cibuild-setup-ubuntu.sh b/.github/workflows/cibuild-setup-ubuntu.sh index c7cc96c3cb..f65393f4a2 100755 --- a/.github/workflows/cibuild-setup-ubuntu.sh +++ b/.github/workflows/cibuild-setup-ubuntu.sh @@ -40,7 +40,7 @@ PACKAGES_OPTIONAL=( if [[ "$QEMU_USER" != "1" ]]; then MODULES_PACKAGE="linux-modules-extra-$(uname -r)" # may not exist anymore - if apt-cache show "$MODULES_PACKAGE" >/dev/null 2>&1; then + if APT_CACHE_OUTPUT=$(apt-cache show "$MODULES_PACKAGE") && [[ -n "$APT_CACHE_OUTPUT" ]]; then PACKAGES+=("$MODULES_PACKAGE") fi fi -- 2.47.2