Closed whyboris closed 4 months ago
This is actually as intended, although I can see why it would be confusing. Just will only run normal recipes once, even if they appear more than once on the command line, or more than once in recipe dependencies. Just also doesn't necessarily run recipes in the same order as they're passed on the command line. If you do just a b
, and a
is a dependency of b
, it will run b
first and then a
.
I suggest adding a quick note in the relevant section:
https://github.com/casey/just?tab=readme-ov-file#features
You can also use dependencies to run multiple recipes by default:
_Note:_ just will not run a recipe twice
The model I had in my head was "recipe", meaning a step-by-step instruction of what just
will do. I'm puzzled why anyone would expect just
to ignore an instruction.
I am not insisting on implementing changes - I super ❤️ love just
❤️ -- I just think that even though my use case is unusual, there may be others who will have cleanup steps in their script.
My example: https://github.com/whyboris/utilitarianism.net/blob/main/justfile I build a website in three steps: search, PDF, and production - so I had to duplicate a cleanup step :trollface:
I think that's reasonable, I'll reopen this issue to track adding a note to the docs.
@casey I think this issue is now closed.
Example
justfile
:Expected output from
just lol
Actual output from
just lol
I think this is a bug because I had a command that did cleanup between various other commands and I spent 2 hours trying to figure out why cleanup wasn't working 😢