mirror of
https://github.com/go-task/task.git
synced 2026-07-01 00:24:30 +00:00
feat(taskfile): skip var merge when SCOPED_INCLUDES enabled
When the SCOPED_INCLUDES experiment is enabled, variables from included Taskfiles are no longer merged globally. They remain in their original Taskfile within the DAG. Exception: flatten includes still merge variables globally to allow sharing common variables across multiple Taskfiles.
This commit is contained in:
3
setup.go
3
setup.go
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/go-task/task/v3/internal/logger"
|
||||
"github.com/go-task/task/v3/internal/output"
|
||||
"github.com/go-task/task/v3/internal/version"
|
||||
"github.com/go-task/task/v3/experiments"
|
||||
"github.com/go-task/task/v3/taskfile"
|
||||
"github.com/go-task/task/v3/taskfile/ast"
|
||||
)
|
||||
@@ -105,7 +106,7 @@ func (e *Executor) readTaskfile(node taskfile.Node) error {
|
||||
return err
|
||||
}
|
||||
e.Graph = graph
|
||||
if e.Taskfile, err = graph.Merge(); err != nil {
|
||||
if e.Taskfile, err = graph.Merge(experiments.ScopedIncludes.Enabled()); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user