1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00

Export Time Struct to Template

This commit is contained in:
Stephen Prater
2019-08-25 13:16:59 -07:00
parent cb6fe4bb59
commit a1aec8178a
11 changed files with 40 additions and 26 deletions

View File

@ -106,10 +106,10 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
return nil, err
}
vars[strings.ToUpper(checker.Kind())] = taskfile.Var{Static: value}
// Adding new static variables, requires us to refresh the templaters
// cache of the the static values
r.RefreshStringMap()
vars[strings.ToUpper(checker.Kind())] = taskfile.Var{Live: value}
// Adding new variables, requires us to refresh the templaters
// cache of the the values manually
r.RefreshCacheMap()
new.Status = r.ReplaceSlice(origTask.Status)
}