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

Fixer does not work on macOS #17

Open
jackbentley opened this issue Feb 25, 2020 · 0 comments · May be fixed by #22
Open

Fixer does not work on macOS #17

jackbentley opened this issue Feb 25, 2020 · 0 comments · May be fixed by #22

Comments

@jackbentley
Copy link

I know this is intended to be run through docker; however when run on macOS, the fixers don't work due to a missing space in the sed arguments.

It results in the following error:

sed: -e: No such file or directory

The solution is to simply add a space between the -i of the sed command and the blank '' on this line:

MY_FIX_CMD="aci-trailing-newline -1 \"\$1\" || ((echo \"\" >> \"\$1\" && sed -i\"\" -e :a -e \"/^\n*\\\$/{\\\$d;N;ba\" -e \"}\" \"\$1\") && echo \"Fixing: \$1\" || echo \"FAILED: \$1\")"

So it becomes this:

MY_FIX_CMD="aci-trailing-newline -1 \"\$1\" || ((echo \"\" >> \"\$1\" && sed -i \"\" -e :a -e \"/^\n*\\\$/{\\\$d;N;ba\" -e \"}\" \"\$1\") && echo \"Fixing: \$1\" || echo \"FAILED: \$1\")"
@jackbentley jackbentley linked a pull request Nov 9, 2020 that will close this issue
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.

1 participant