mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
The provider version check in `generate.sh --check` uses nested sed
brace blocks that BSD sed rejects ("extra characters at the end of }
command"), so the check always fails on stock macOS. A failing check
makes `make gen` (and therefore the full pre-commit hook) regenerate
every terraform fixture, which is not reproducible on macOS hosts
because the `coder_provisioner` data source records the host `os`/`arch`
(`darwin`/`arm64` instead of the committed `linux`/`amd64`), leaving
permanent unstaged churn that fails `check-unstaged`.
Replace the nested-brace expression with two simple sed passes that
behave identically under GNU and BSD sed. Verified on macOS
(`/usr/bin/sed`) and GNU sed: both extract `2.15.0`, matching
`provider-version.txt`, and `generate.sh --check` now exits 0 on a clean
checkout.
🤖 Generated with [Claude Code](https://claude.com/claude-code)