Open tennox opened 8 months ago
It's some some hard to fix this problem, and you can use tk --runner=task hello
to task in Taskfile.yaml
. I will think about it and find a good solution to fix this problem.
I'd propose:
TASKKEEPER_PRECEDENCE
, that can:
task
task,just
--all
to run tasks of all runners (akin to current behaviour)TASKKEEPER_DISFAVOR
, that marks runners as "only use if no other one is available" - I'm not sure this is needed (don't see a use-case), but could be an option for later in case it does become needeHow about following flow:
How about following flow
Looks about right... I do agree with putting Readme in the generic category as I've learnt it does require to specifically mark a readme code fence as a task.
One thing I'm a bit unclear about though:
what do you mean by alphabet: a-z
? I don't think the lexical order should have anything to do with selection..?
Also, just in case you were planning to put the diagram in the readme - it doesn't clearly state what happens if neither --all
nor --runner
are given - the arrow might benefit from a description "Select first by precedence", and positioning the env var descriptions related to that, not next to "all runners" flow - but this does not matter too much imo, just my two cents :tipping_hand_man:
If I have a task
dev
in e.g.package.json
&Taskfile.yaml
, it will run both. This is undesirable for me (and I feel like it used to be different?), as I often define tasks in both places, but the Taskfile would e.g. havepnpm install
as dependency, and then run thepnpm run dev
task (from package.json).I don't see a clear way to define precedence between the task managers (config file / Env var
TK_PREFER_MANAGERS
?), but for this to be useful to me it would need something to change :thinking: