diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d431d49..fe952db7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Small bug fix: closing "Taskfile.yml" once we're done reading it + ([#963](https://github.com/go-task/task/issues/963), [#964](https://github.com/go-task/task/pull/964) by @HeCorr). - Add `--json` flag (alias `-j`) with the intent to improve support for code editors and add room to other possible integrations. This is basic for now, but we plan to add more info in the near future diff --git a/taskfile/read/taskfile.go b/taskfile/read/taskfile.go index 10fb37e1..0db409e7 100644 --- a/taskfile/read/taskfile.go +++ b/taskfile/read/taskfile.go @@ -198,6 +198,7 @@ func readTaskfile(file string) (*taskfile.Taskfile, error) { return nil, err } defer f.Close() + var t taskfile.Taskfile if err := yaml.NewDecoder(f).Decode(&t); err != nil { return nil, fmt.Errorf("task: Failed to parse %s:\n%w", filepathext.TryAbsToRel(file), err)