#324 implement dotenv

This commit is contained in:
Chris Garrett
2020-08-03 16:18:38 -06:00
parent e5a3c861cb
commit 8b962fb8e8
13 changed files with 144 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ type Taskfile struct {
Env *Vars
Tasks Tasks
Silent bool
Dotenv []string
}
// UnmarshalYAML implements yaml.Unmarshaler interface
@@ -30,6 +31,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
Env *Vars
Tasks Tasks
Silent bool
Dotenv []string
}
if err := unmarshal(&taskfile); err != nil {
return err
@@ -43,6 +45,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
tf.Env = taskfile.Env
tf.Tasks = taskfile.Tasks
tf.Silent = taskfile.Silent
tf.Dotenv = taskfile.Dotenv
if tf.Expansions <= 0 {
tf.Expansions = 2
}