-
-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"default" task from included taskfile should be executed when no task name is provided #661
Comments
Hi @ankushg! Thank you for the report. This does seem like the intended behavior because of the way we merge included taskfiles into the parent. I think an additional step could be added to check for the existence of Just after this step: task/taskfile/read/taskfile.go Line 113 in 2373743
if(includedTaskfile.Tasks["default"] != nil) {
t.Tasks[namespace] = includedTaskfile.Tasks["default"]
} I'm interested in how @kerma and @andreynering feel about this. This could be a good first issue for anyone looking to contribute to the project. We would need additional unit tests to cover the behavior. For now a good workaround could be to define task version: '3'
includes:
main: .taskfiles/main.yml
tasks:
main:
cmds:
- task: main:default |
Hi @ankushg, I had the impression that this was proposed before, but I couldn't find the related issue in a quick search. This probably makes sense, but we need to take possible conflicts into account. For example: it's possible that both a |
I kind of see namespaces in I like the concept though that namespaces are strictly enforced, and "shadowing" is either prohibited, or there's a warning that a task is shadowing an include. Allowing you to call I like to look at upstream code/binaries/packages not as a way to "follow the crowd", but as a way to help "preload" intent with what a user may already be used to or expect. So how does https://www.gnu.org/software/make/manual/html_node/Goals.html |
linking this to #694 to track for v4 |
Implemented on #661. |
Hi Team, Can't we run all task defined Taskfile.yml, because if we have n number of tasks do we need to manually name each task in cmd line ''task task1 task2...'', can't we have some option like --all to run all tasks. Thanks. |
@aweseeker see #360 |
I really like the behavior that
Unfortunately, it doen't seem to play well with included taskfiles.
For example, if I have a root
Taskfile.yml
with the following contents:and
.taskfiles/main.yml
:I would like to run something like
task main
and have it automatically runtask main:default
Currently though, I need to explicitly run
task main:default
The text was updated successfully, but these errors were encountered: