From 00577e538fd15dfb3097a01a0beb1a4bed6d11ba Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 18 Nov 2026 18:50:50 -0500 Subject: [PATCH] chore(ci): use [[ ]] in shell scripts (SonarCloud S7688) (#2304) --- scripts/ci-full-validation.sh | 4 ++-- scripts/ci-test-inputs.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci-full-validation.sh b/scripts/ci-full-validation.sh index 3b413ec88..593a3ee09 100644 --- a/scripts/ci-full-validation.sh +++ b/scripts/ci-full-validation.sh @@ -2,11 +2,11 @@ # Restore both runtime feature configurations, docs and ordinary example linking, without fuzz caps. set -euo pipefail unset CRAFT_HOSTILE_DIVISOR PROPTEST_CASES -if [ "${RUNNER_OS:-}" = Windows ]; then +if [[ "${RUNNER_OS:-}" = Windows ]]; then powershell.exe -NoProfile -Command '$ErrorActionPreference = "Stop"; Start-Service Spooler; Add-PrinterDriver -Name "Generic / Text Only"' fi # Windows cannot spawn one rustfmt command with every workspace target (#2200). -if [ "${RUNNER_OS:-}" = Windows ]; then +if [[ "${RUNNER_OS:-}" = Windows ]]; then python scripts/ci-format-workspace.py else cargo fmt --check diff --git a/scripts/ci-test-inputs.sh b/scripts/ci-test-inputs.sh index 32af3ea77..dcccec61c 100755 --- a/scripts/ci-test-inputs.sh +++ b/scripts/ci-test-inputs.sh @@ -13,7 +13,7 @@ set -euo pipefail photocraft=74330157cb601573ae4523a95bb9132822fc3918 fetcher=.test-inputs/photocraft -if [ -z "$(ls -A "$fetcher/corpus" 2>/dev/null)" ]; then +if [[ -z "$(ls -A "$fetcher/corpus" 2>/dev/null)" ]]; then rm -rf "$fetcher" mkdir -p "$fetcher" git -C "$fetcher" init --quiet