1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

First step implementing "prefixed" output option

Ref #104
This commit is contained in:
Andrey Nering
2018-04-22 15:41:53 -03:00
parent 051ff35878
commit a407b0a8eb
7 changed files with 77 additions and 5 deletions

View File

@@ -39,6 +39,7 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
Env: r.ReplaceVars(origTask.Env),
Silent: origTask.Silent,
Method: r.Replace(origTask.Method),
Prefix: r.Replace(origTask.Prefix),
}
new.Dir, err = homedir.Expand(new.Dir)
if err != nil {
@@ -47,6 +48,9 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
if e.Dir != "" && !filepath.IsAbs(new.Dir) {
new.Dir = filepath.Join(e.Dir, new.Dir)
}
if new.Prefix == "" {
new.Prefix = new.Task
}
for k, v := range new.Env {
static, err := e.Compiler.HandleDynamicVar(v)
if err != nil {