Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost operator uses wrong sed parameter #174

Closed
j-ilden opened this issue Oct 7, 2021 · 2 comments · Fixed by #175
Closed

localhost operator uses wrong sed parameter #174

j-ilden opened this issue Oct 7, 2021 · 2 comments · Fixed by #175

Comments

@j-ilden
Copy link

j-ilden commented Oct 7, 2021

Whenever you want to add or remove a localhost entry, you get the following error

❯ m localhost remove domain.iWantToRemoveFromLocalhost.com sed: 1: "/etc/hosts": extra characters at the end of h command Flushing dns...

❯ m info
ProductName: macOS
ProductVersion: 11.6
BuildVersion: 20G165

Reference: https://stackoverflow.com/questions/16745988/sed-command-with-i-option-in-place-editing-works-fine-on-ubuntu-but-not-mac

Workaround or steps to reproduce the fix:
I installed gnu-sed using brew
brew install gnu-sed

...after that export the path to use the proper sed
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

and then it worked.

@bensleveritt
Copy link
Collaborator

Ah, that's frustrating. It's a risk of using fairly common (but clearly different) tools that Apple have cloned...

I'll see if I can get it working in old Apple sed. Thanks for the bug rep

@bensleveritt
Copy link
Collaborator

This'll be in the next release. Thanks for raising!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants