Commit Graph

2 Commits

Author SHA1 Message Date
Vitalii
fef57f99ba fix(scripts): docs-spellcheck.sh fails on bash 3.2 with set -u
scripts/docs-spellcheck.sh uses set -u and constructs args=( ... "${write_flag[@]}" ), where write_flag may be an empty array. On bash 3.2 (still the default /bin/bash on macOS), referencing an empty array under set -u raises an unbound variable error. Newer bash (>= 4.4) handles this expression correctly, which is why the script ships green on Linux CI runners.

Switch to the bash 3.2-safe parameter expansion ${write_flag[@]+"${write_flag[@]}"}: it expands to nothing when the array is empty and to the array contents otherwise, preserving --write behavior unchanged.

Also fixes overrideable -> overridable in docs/reference/test.md, which the now-running spellcheck surfaces.

Repro:
  bash scripts/docs-spellcheck.sh                # was: write_flag[@]: unbound variable, exit 1
  bash scripts/docs-spellcheck.sh                # now: codespell runs to completion
2026-05-25 20:56:52 +01:00
Peter Steinberger
352b5262da fix(ci): make docs spellcheck fallback deterministic 2026-02-21 15:08:28 +01:00