mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
Merge pull request #887 from ronaudinho/fix/yaml-error-msg
Add file path to YAML error message
This commit is contained in:
@@ -189,7 +189,10 @@ func readTaskfile(file string) (*taskfile.Taskfile, error) {
|
||||
return nil, err
|
||||
}
|
||||
var t taskfile.Taskfile
|
||||
return &t, yaml.NewDecoder(f).Decode(&t)
|
||||
if err := yaml.NewDecoder(f).Decode(&t); err != nil {
|
||||
return nil, fmt.Errorf("%s: %w", file, err)
|
||||
}
|
||||
return &t, nil
|
||||
}
|
||||
|
||||
func exists(path string) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user