Skip to content

error: Justfile does not contain recipes when pre-committing #1984

Answered by cmb84scd
AlessandroMiola asked this question in Q&A
Discussion options

You must be logged in to vote

I came across this question while trying to solve the same problem and wanted to share something I have just discovered.

If I add pass_filenames: false to the pre-commit hook and use a just recipe, it then works as expected. I found this article semi-helpful in understanding what was going on and although I still don't fully get it, it would appear pre-commit passing in the files is causing conflicts with Just.

I don't know if this is the best/right solution but I would be interested to know what others think and why it's necessary to add it to get pre-commit to work nicely with just. Thanks.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@muzimuzhi
Comment options

Answer selected by casey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants