Skip to content

Commit b552cc2

Browse files
committed
yaml: use UnmarshalStrict instead on Unmarshal
go-yaml/yaml#262
1 parent 4ae9c24 commit b552cc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

taskfile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (e *Executor) ReadTaskfile() error {
3636

3737
func (e *Executor) readTaskfileData(path string) (tasks map[string]*Task, err error) {
3838
if b, err := ioutil.ReadFile(path + ".yml"); err == nil {
39-
return tasks, yaml.Unmarshal(b, &tasks)
39+
return tasks, yaml.UnmarshalStrict(b, &tasks)
4040
}
4141
return nil, taskFileNotFound{path}
4242
}
@@ -45,7 +45,7 @@ func (e *Executor) readTaskvars() error {
4545
file := filepath.Join(e.Dir, TaskvarsFilePath)
4646

4747
if b, err := ioutil.ReadFile(file + ".yml"); err == nil {
48-
if err := yaml.Unmarshal(b, &e.taskvars); err != nil {
48+
if err := yaml.UnmarshalStrict(b, &e.taskvars); err != nil {
4949
return err
5050
}
5151
}

0 commit comments

Comments
 (0)