mirror of
https://github.com/go-task/task.git
synced 2025-01-14 04:35:50 +02:00
Moved handleVariables() into command loop
This commit is contained in:
parent
8619c8d417
commit
9abe71e967
9
task.go
9
task.go
@ -111,11 +111,12 @@ func RunTask(name string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vars, err = t.handleVariables() // read in a second time, as a dependency could have set a new env variable
|
|
||||||
if err != nil {
|
|
||||||
return &taskRunError{name, err}
|
|
||||||
}
|
|
||||||
for _, c := range t.Cmds {
|
for _, c := range t.Cmds {
|
||||||
|
// read in a each time, as a command could change a variable or it has been changed by a dependency
|
||||||
|
vars, err = t.handleVariables()
|
||||||
|
if err != nil {
|
||||||
|
return &taskRunError{name, err}
|
||||||
|
}
|
||||||
var (
|
var (
|
||||||
output string
|
output string
|
||||||
err error
|
err error
|
||||||
|
Loading…
Reference in New Issue
Block a user