1
0
mirror of https://github.com/go-task/task.git synced 2025-01-04 03:48:02 +02:00

Small optimization and bug fix: don't compute variables if not needed for dotenv:

Closes #517
This commit is contained in:
Andrey Nering 2021-07-10 19:46:53 -03:00
parent 824b0c0132
commit 945c72cf6c
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## Unreleased
- Small optimization and bug fix: don't compute variables if not needed for
`dotenv:` ([#517](https://github.com/go-task/task/issues/517)).
## v3.5.0 - 2021-07-04
- Add support for interpolation in `dotenv:`

View File

@ -12,6 +12,10 @@ import (
)
func Dotenv(c compiler.Compiler, tf *taskfile.Taskfile, dir string) (*taskfile.Vars, error) {
if len(tf.Dotenv) == 0 {
return nil, nil
}
vars, err := c.GetTaskfileVariables()
if err != nil {
return nil, err