mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-23 07:47:15 +00:00
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
|
||
|---|---|---|
| .. | ||
| templates | ||
| AGENTS.default.md | ||
| api-usage-costs.md | ||
| application-modernization-plan.md | ||
| code-mode.md | ||
| credits.md | ||
| device-models.md | ||
| full-release-validation.md | ||
| memory-config.md | ||
| openclaw-sdk-api-design.md | ||
| prompt-caching.md | ||
| RELEASING.md | ||
| rich-output-protocol.md | ||
| rpc.md | ||
| secret-placeholder-conventions.md | ||
| secretref-credential-surface.md | ||
| secretref-user-supplied-credentials-matrix.json | ||
| session-management-compaction.md | ||
| test.md | ||
| token-use.md | ||
| transcript-hygiene.md | ||
| wizard.md | ||