Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

OXS throws an xargs error when using the pre-commit hook #88

Open
Marto32 opened this issue Feb 5, 2017 · 2 comments
Open

OXS throws an xargs error when using the pre-commit hook #88

Marto32 opened this issue Feb 5, 2017 · 2 comments

Comments

@Marto32
Copy link

Marto32 commented Feb 5, 2017

When trying to commit on OSX (after properly installing the pre-commit hooks and .gitlint.yaml file), I receive the following error:

xargs: illegal option -- -

I believe this is caused by this line as OSX xargs don't seem to support --null and --no-run-if-empty. (Also seen in the hg file).

I'd like to note that the actual git lint command works fine. I seem to only get this when trying to commit.

@sk-
Copy link
Owner

sk- commented Feb 6, 2017

Hi Michael, thanks for reporting this.

In OSX the --null option is called -0 which also works in GNU versions, so we can easily replace that part. However the --no-run-if-empty does not exist, but could be simulated by assigning the result to a variable and checking if the variable is not empty.

Feel free to send a PR.

@Marto32
Copy link
Author

Marto32 commented Feb 7, 2017

Sent - #89

@sk- sk- mentioned this issue Jul 15, 2017
@sk- sk- marked this as a duplicate of #91 Jul 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants