Skip to content

When importing a Taskfile, apply that Taskfiles global Run to all imported Tasks (if not set).#2548

Open
trulede wants to merge 2 commits intogo-task:mainfrom
trulede:PR/merge_run
Open

When importing a Taskfile, apply that Taskfiles global Run to all imported Tasks (if not set).#2548
trulede wants to merge 2 commits intogo-task:mainfrom
trulede:PR/merge_run

Conversation

@trulede
Copy link
Contributor

@trulede trulede commented Dec 6, 2025

It seems reasonable, that if a Taskfile is designed with the global Run property assigned, then it should probably be retained if that Taskfile is imported.

It could be that the logic in

func (e *Executor) GetHash(t *ast.Task) (string, error) {
	r := cmp.Or(t.Run, e.Taskfile.Run)

should be revised to match; which is to suggest that task.Run should be set for the importing Taskfile too (and e.Taskfile.Run removed from the above logic).

fixes #1738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honour the global-level 'run: once' setting in an included Taskfile

1 participant