chore(ci): use [[ ]] in shell scripts (SonarCloud S7688) (#2304)

This commit is contained in:
Dylan M. Taylor
2026-11-18 18:50:50 -05:00
committed by GitHub
parent 0e6af4121b
commit 00577e538f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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