Skip to content

Fix sed -i option on MacOS#132

Merged
schlessera merged 1 commit intowp-cli:masterfrom
patrik-csak:fix-script
Mar 27, 2018
Merged

Fix sed -i option on MacOS#132
schlessera merged 1 commit intowp-cli:masterfrom
patrik-csak:fix-script

Conversation

@patrik-csak
Copy link
Copy Markdown
Contributor

@patrik-csak patrik-csak commented Mar 6, 2018

The -i syntax is: -i[SUFFIX]. There should be no space between -i
and the suffix. See sed Command Line Options.

Before this fix, I saw the following error on macOS:

sed: -e expression #1, char 1: unknown command: `.'

The -i syntax is: `-i[SUFFIX]`. There should be no space between `-i`
and the suffix. See https://www.gnu.org/software/sed/manual/sed.html#Command_002dLine-Options-1
@patrik-csak
Copy link
Copy Markdown
Contributor Author

Oops. Looks like maybe this broke other things. I'll investigate further.

@gitlost
Copy link
Copy Markdown
Contributor

gitlost commented Mar 6, 2018

@ptrkcsk that's not you that broke that, it's due to this recent change in core trunk https://core.trac.wordpress.org/ticket/43228 which hopefully will be addressed soon (if not we'll have to do a workaround). (See also wp-cli/wp-cli#4718 (comment))

Thanks for the PR by the way! Not a Mac user, but it's odd to me that this issue has only been noticed now?!

@patrik-csak
Copy link
Copy Markdown
Contributor Author

Not a Mac user, but it's odd to me that this issue has only been noticed now?!

Developing without virtualization is so 2008. 🙂

@schlessera schlessera added bug command:scaffold Related to 'scaffold' command labels Mar 27, 2018
@schlessera schlessera added this to the 1.1.3 milestone Mar 27, 2018
@schlessera schlessera merged commit a9d4346 into wp-cli:master Mar 27, 2018
@schlessera
Copy link
Copy Markdown
Member

Thanks for the pull request, @ptrkcsk !

@patrik-csak
Copy link
Copy Markdown
Contributor Author

Glad I could help!

@schlessera schlessera changed the title Fix sed -i option Fix sed -i option on MacOS Apr 21, 2018
danielbachhuber pushed a commit that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:scaffold Related to 'scaffold' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants