Closed fgrehm closed 6 years ago
"Do you have any thoughts on the best way to make the gem compatible with alpine?"
That's a good question. I believe we are only checking the version to see if grep
supports the -E
or the -P
flag. We could probably keep the same check and just redirect output using the system
command. That should solve your output problem.
As far as functionality goes, does the functionality behave as you would like? It looks like you want the -E
option as well. 🤔
Released v0.38.0
https://rubygems.org/gems/pre-commit
This should clear up the standard error output. Please file another issue if it is not behaving properly.
must admit I'm not sure the legitimate of my hijacking this issue but it's the only seams related with seams to have an answer so here my question
grep
option -P
don't exist in alpine 3.8
which it use in a bash
what was/is the solution ?
aka it is possible to import a static grep from alpine to alpine ?
by digging I found this
echo "BusybBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\""
is'nt it the answer ?
must admit I'm not sure the legitimate of my hijacking this issue but it's the only seams related with seams to have an answer so here my question
grep
option-P
don't exist in alpine 3.8 which it use in a bash what was/is the solution ?aka it is possible to import a static grep from alpine to alpine ?
by digging I found this
echo "BusybBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\""
is'nt it the answer ?
Upgrading the grep using "apk add --no-cache --upgrade grep" has solved my problem with --exclude option in Alpine.
Hey @jish!
We use Docker for our development environments and they are all based on Alpine Linux.
Even though we can make it work by 💆♂️ ing configs in order to run pre commit inside our Docker containers with something along these lines:
We get a lot of noise in our pre commit checks. I tracked down the reason to the fact that we have a
grep --version
hardcoded here:https://github.com/jish/pre-commit/blob/51f1223f335437685ee45f6735235e00eef3d709/lib/pre-commit/checks/grep.rb#L94
Unfortunately that's not a valid parameter for the
grep
shipped with Alpine 😢Do you have any thoughts on the best way to make the gem compatible with alpine? I can try putting up a PR for that 😄