fix(includes): propagate silent mode from included Taskfiles to tasks (#2640)

This commit is contained in:
Timothy Rule
2026-01-25 16:33:52 +01:00
committed by GitHub
parent 065236f076
commit f6720760b4
10 changed files with 89 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/joho/godotenv"
"github.com/go-task/task/v3/errors"
"github.com/go-task/task/v3/internal/deepcopy"
"github.com/go-task/task/v3/internal/env"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/filepathext"
@@ -57,7 +58,7 @@ func (e *Executor) CompiledTaskForTaskList(call *Call) (*ast.Task, error) {
Vars: vars,
Env: nil,
Dotenv: origTask.Dotenv,
Silent: origTask.Silent,
Silent: deepcopy.Scalar(origTask.Silent),
Interactive: origTask.Interactive,
Internal: origTask.Internal,
Method: origTask.Method,
@@ -113,7 +114,7 @@ func (e *Executor) compiledTask(call *Call, evaluateShVars bool) (*ast.Task, err
Vars: vars,
Env: nil,
Dotenv: templater.Replace(origTask.Dotenv, cache),
Silent: origTask.Silent,
Silent: deepcopy.Scalar(origTask.Silent),
Interactive: origTask.Interactive,
Internal: origTask.Internal,
Method: templater.Replace(origTask.Method, cache),