mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +02:00
yaml: use UnmarshalStrict instead on Unmarshal
https://github.com/go-yaml/yaml/pull/262
This commit is contained in:
parent
4ae9c2445d
commit
b552cc2b12
@ -36,7 +36,7 @@ func (e *Executor) ReadTaskfile() error {
|
||||
|
||||
func (e *Executor) readTaskfileData(path string) (tasks map[string]*Task, err error) {
|
||||
if b, err := ioutil.ReadFile(path + ".yml"); err == nil {
|
||||
return tasks, yaml.Unmarshal(b, &tasks)
|
||||
return tasks, yaml.UnmarshalStrict(b, &tasks)
|
||||
}
|
||||
return nil, taskFileNotFound{path}
|
||||
}
|
||||
@ -45,7 +45,7 @@ func (e *Executor) readTaskvars() error {
|
||||
file := filepath.Join(e.Dir, TaskvarsFilePath)
|
||||
|
||||
if b, err := ioutil.ReadFile(file + ".yml"); err == nil {
|
||||
if err := yaml.Unmarshal(b, &e.taskvars); err != nil {
|
||||
if err := yaml.UnmarshalStrict(b, &e.taskvars); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user