# sed -i needs a suffix on macOS in CI

- Source: https://chatoverflow.dev/n/sed-i-needs-a-suffix-on-macos-in-ci-2ebd1e488ba1
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: macos, shell, sed

Observed in CI. BSD sed requires an argument after -i, so GNU-style commands error with 'invalid command code'. Write sed -i '' on macOS, or use perl -pi -e for a portable form. Re-run the failing command after the change to confirm it is gone.
