mirror of
https://github.com/go-task/task.git
synced 2025-06-15 00:15:10 +02:00
fix: forward env to RunCommand when evaluating sh vars (#1869)
* forward env to RunCommand when evaluating sh vars. fixes #1742 * feat: added tests * fix: test --------- Co-authored-by: Pete Davison <pd93.uk@outlook.com>
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"github.com/joho/godotenv"
|
||||
|
||||
"github.com/go-task/task/v3/errors"
|
||||
"github.com/go-task/task/v3/internal/env"
|
||||
"github.com/go-task/task/v3/internal/execext"
|
||||
"github.com/go-task/task/v3/internal/filepathext"
|
||||
"github.com/go-task/task/v3/internal/fingerprint"
|
||||
@ -115,7 +116,7 @@ func (e *Executor) compiledTask(call *ast.Call, evaluateShVars bool) (*ast.Task,
|
||||
new.Env.Set(k, ast.Var{Value: v.Value})
|
||||
return nil
|
||||
}
|
||||
static, err := e.Compiler.HandleDynamicVar(v, new.Dir)
|
||||
static, err := e.Compiler.HandleDynamicVar(v, new.Dir, env.GetFromVars(new.Env))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user