Closed intptr-t closed 7 months ago
Thanks for the very clearly written issue, and proposal, @intptr-t ! You say:
Since GNU-based sed and BSD-based sed are currently incompatible, conditional branching is required for completion in the shell alone.
Do you know the right condition to use? If so, do you want to send a PR with proposed fix? If so, we can quickly validate and merge it for the next release. LMK. Thanks!
Thanks for the response @rstrahan. I have created a PR. I hope you will check it out.
Merged the PR.. Your fix will be in next release. Thanks for being an LCA contributor!
Problem
When I run
publish.sh
on macOS, I get the following error withsed
.Cause
Because sed on macOS is BSD-based, the "-i" option is handled differently. Therefore,
sed -i 's/"version": *"\([0-9]*\. [0-9]*\. [0-9]*\)"/"version":"\1-LCA"/' $dir/package.json
will cause an error in./publish.sh
.Reference: https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux
Proposal
Since GNU-based sed and BSD-based sed are currently incompatible, conditional branching is required for completion in the shell alone.
Note The
-i''
hack has been fixed in macOS 10.14 (Mojave) and later, so it does not seem to work.Environment
macOS: Sonoma 14.1