Issue #3567360 by jwilson3: Fix cspell issues (ignored words, yarn 4+ compat)
The ddev cspell command was failing due to multiple issues:
- Broken shebang (#!/usr/bin/env missing shell name) caused the script to hang
- Yarn 4+ uses Plug'n'Play (PnP) by default, which doesn't create node_modules/.bin/ binaries
The automated Gitlab CI jobs to review MRs on the issue queue were failing due to spelling issue.
- Minor cspell dictionary issues (missing word "colour")
Changes
- Fix broken shebang — Changed #!/usr/bin/env to #!/usr/bin/env bash
- Support Yarn 4+ PnP mode — The cspell command now detects and handles both traditional node_modules and Yarn PnP modes:
- Tries node_modules/.bin/cspell first (traditional mode)
- Falls back to yarn cspell in PnP mode
- Uses a run_cspell() helper that cds into core/ for Corepack to detect Yarn 4
- Uses absolute paths for config files to work from any directory
- Update cspell dictionary — Added "colour" to .cspell-project-words.txt and fixed missing newline at EOF
Closes #3567360