Skip to content

Commit 6ef1dbb

Browse files
committed
ci: the manifest rewrite must work on both systems
`sed -i` without a backup suffix is GNU-only. BSD sed reads the following word as the suffix, so on macOS the expression was taken as the file name and the step failed with `invalid command code m`. The defect could only be found on macOS. It is the platform for which no local verification is available here, and the reason the two workflows are kept identical apart from the platform and the implementation they name: a form that works in one and not the other is a difference that should not exist.
1 parent 7aabd33 commit 6ef1dbb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ jobs:
9292
# program exists to demonstrate.
9393
- name: The portable program runs
9494
run: |
95-
sed -i 's|^openkal = ".*"$|openkal = { path = ".spec" }|' mcpp.toml
95+
# Not `sed -i`: BSD sed requires a backup suffix after -i and reads
96+
# the next word as one, so the GNU form fails on macOS with
97+
# `invalid command code m`. This form is the same on both.
98+
sed 's|^openkal = ".*"$|openkal = { path = ".spec" }|' mcpp.toml > mcpp.toml.next
99+
mv mcpp.toml.next mcpp.toml
96100
cat > .spec/examples/portable/mcpp.toml <<'TOML'
97101
[package]
98102
name = "portable"

0 commit comments

Comments
 (0)