From 971ea5f8d5362248e0695aed5fe49b2199ddf571 Mon Sep 17 00:00:00 2001 From: miampf Date: Tue, 25 Feb 2025 12:05:15 +0100 Subject: [PATCH] expand `!!` manually to help shellcheck --- .github/workflows/check-measurements-reproducibility.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-measurements-reproducibility.yml b/.github/workflows/check-measurements-reproducibility.yml index aa65d270e..acc6b4175 100644 --- a/.github/workflows/check-measurements-reproducibility.yml +++ b/.github/workflows/check-measurements-reproducibility.yml @@ -107,9 +107,10 @@ jobs: echo "Own measurements for $attestationVariant:" ts " " < "$attestationVariant"_own-measurements.json - # TODO: cache errors and return them later. + # not using $? since shellcheck complained about that, so code duplication seems to be + # a better tradeoff if ! jd ./"$attestationVariant"_their-measurements.json ./"$attestationVariant"_own-measurements.json; then - errors["$attestationVariant"]="$(!!)" + errors["$attestationVariant"]="$(jd ./"$attestationVariant"_their-measurements.json ./"$attestationVariant"_own-measurements.json)" fi done