mirror of
https://github.com/go-task/task.git
synced 2026-07-07 22:18:47 +00:00
Small optimization and bug fix: don't compute variables if not needed for dotenv:
Closes #517
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user