diff --git a/.github/actions/nss/action.yml b/.github/actions/nss/action.yml index 68e222710c..b53104bb6d 100644 --- a/.github/actions/nss/action.yml +++ b/.github/actions/nss/action.yml @@ -23,11 +23,15 @@ runs: echo "BUILD_NSS=1" >> "$GITHUB_ENV" exit 0 fi - NSS_VERSION=$(pkg-config --modversion nss) - NSS_MAJOR=$(echo $NSS_VERSION | cut -d. -f1) - NSS_MINOR=$(echo $NSS_VERSION | cut -d. -f2) + NSS_VERSION=$(pkg-config --modversion nss &> /dev/null) + if [ "$?" -ne 0 ]; then + echo "BUILD_NSS=1" >> "$GITHUB_ENV" + exit 0 + fi + NSS_MAJOR=$(echo "$NSS_VERSION" | cut -d. -f1) + NSS_MINOR=$(echo "$NSS_VERSION" | cut -d. -f2) # Keep this in sync with what the code requires - if [ $NSS_MAJOR -ne 3 ] || [ $NSS_MINOR -lt 98 ]; then + if [ "$NSS_MAJOR" -ne 3 ] || [ "$NSS_MINOR" -lt 98 ]; then echo "System NSS is too old: $NSS_VERSION" echo "BUILD_NSS=1" >> "$GITHUB_ENV" else