Replies: 8 comments
-
@btd1337 Did you try enclosing the command in quotes inside your
|
Beta Was this translation helpful? Give feedback.
-
@tylerbutler Your solution don't worked for me. The same error occurred. |
Beta Was this translation helpful? Give feedback.
-
@btd1337 look like
https://github.com/Arkweid/lefthook/blob/master/cmd/run.go#L218 |
Beta Was this translation helpful? Give feedback.
-
@Arkweid Using sh the command fails... It occurred the same error. |
Beta Was this translation helpful? Give feedback.
-
Is there any way to get Lefthook to use another shell interpreter? Ie. tell it to use bash instead of sh? |
Beta Was this translation helpful? Give feedback.
-
As an option you can use script files instead of inline commands. See https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md#managing-scripts |
Beta Was this translation helpful? Give feedback.
-
The downside is that you now have to integrate your own file filtering in that scenario-giving up the convenient one built-in with Lefthook? On MacOS you have access to commands like pushd from the sh interpreter, swap over to WSL and suddenly any more complex layering of commands may now require refactoring to not break. Clearly it isn't Lefthook that is the problem-but it does affect portability. |
Beta Was this translation helpful? Give feedback.
-
Hey! Does the script still fail? For me it doesn't 🤔 |
Beta Was this translation helpful? Give feedback.
-
Hi devs,
When u use this command in
lefthook.yml
:This error is returned:
But when u add this command below it works properly:
run: bash -c "dartanalyzer . > >(tee -a code-errors.log)"
How to solve this error without using an external command?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions