Environment from .env file should be available as variables

Fixes #379
This commit is contained in:
Andrey Nering
2021-01-12 11:09:46 -03:00
parent 1107f691ea
commit e086b654aa
6 changed files with 17 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ var _ compiler.Compiler = &CompilerV3{}
type CompilerV3 struct {
Dir string
TaskfileEnv *taskfile.Vars
TaskfileVars *taskfile.Vars
Logger *logger.Logger
@@ -54,6 +55,9 @@ func (c *CompilerV3) GetVariables(t *taskfile.Task, call taskfile.Call) (*taskfi
}
rangeFunc := getRangeFunc(c.Dir)
if err := c.TaskfileEnv.Range(rangeFunc); err != nil {
return nil, err
}
if err := c.TaskfileVars.Range(rangeFunc); err != nil {
return nil, err
}