Dependencies not being run
I think I've found a bug....
If I now run:
the
hello task doesn't run the dependencies, hello2 is fine
Is this expected or am I doing something wrong?5 Replies
That's an interesting one. I think Task is parsing something that it shouldn't be here. You can make this work by changing your Taskfile to this:
I've just replaced
cmd with cmds and put brackets [] around the command to change it to a list.
The cmd keyword is only meant for a command in a list. e.g:
This is so you can add other keys to the cmd such as slient (like above)Yes, that's why I'm thinking this is a bug why would
cmd: be different from cmds:?
apart from the obvious list vs single commandcmd by design is only supposed to work as an object key in a list of cmds. There is currently no functionality that lets you specify cmd at the top level of a task.
I agree that this is a bug because Task should be erroring with the given Taskfile (since its not currently valid). If we wanted to support cmd at the top level, this would be a feature request
@Rots Would you be willing to post this as an issue on GitHub so we can track it?GitHub
cmd: accepted as task key · Issue #911 · go-task/taskAs discussed in https://discord.com/channels/974121106208354339/1035111266005569567 With this input version: '3' tasks: hello-broken: cmd: echo 'Hello World from Task!&#...
Thank you!