Skip to content

Commands using sed the shell scripts do not work for Mac OS #2257

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

Closed
camilamacedo86 opened this issue Nov 22, 2019 · 5 comments · Fixed by #2260
Closed

Commands using sed the shell scripts do not work for Mac OS #2257

camilamacedo86 opened this issue Nov 22, 2019 · 5 comments · Fixed by #2260
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@camilamacedo86
Copy link
Contributor

Bug Report

What did you do?
For example, try to run make test-sanity in a mac os x.

What did you expect to see?
The test be executed with success

What did you see instead? Under which circumstances?
An error because of the sed

Possible Solution
Check if is mac or Linux and then exec accordingly the command. Or change the implementation in order to not require sed usage.

Additional context
See the places: https://github.com/operator-framework/operator-sdk/search?l=Shell&q=sed

@camilamacedo86 camilamacedo86 changed the title Sed commands in the shell scripts make them do not work in mac os Commands using sed the shell scripts do not work for Mac OS Nov 22, 2019
@camilamacedo86 camilamacedo86 added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. labels Nov 22, 2019
@camilamacedo86
Copy link
Contributor Author

c/c @estroz @joelanford

@camilamacedo86 camilamacedo86 removed the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Nov 22, 2019
@joelanford
Copy link
Member

@camilamacedo86 Yeah, that's a known issue, but I'm not sure every single one of our sed usages is broken. For this particular issue, which sed invocation is erroring out?

@joelanford
Copy link
Member

Also, I sometimes use a Mac and I've gotten around this problem by installing GNU sed from homebrew. The version of sed shipped with Mac OS is super old.

brew install gnu-sed

@camilamacedo86
Copy link
Contributor Author

Thanks @joelanford it does not work. I know that we have this issue with some places .. but would be nice to find a better solution which make work in both. For example, now I am unable to run the test sanity without changing it manually :-(

+ sed -i 's|github.com/operator-framework/operator-sdk\s\+master||g' go.mod
sed: 1: "go.mod": extra characters at the end of g command

@joelanford
Copy link
Member

Submit a PR with the manual change you made to get it to work on Mac 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants