fix: improve error message when searching for Taskfile. by trulede · Pull Request #2682 · go-task/task

When searching for a Taskfile, and the directory ownership changes, provide a message indicating that.

In implementing this change, I noticed that the handling of TaskfileNotFoundError in setup.go would never be hit (bug) and also that the code in fs.go was a little odd - in so much that detecting this condition required returning valid paths and an err, which in many cases the caller would ignore anyway. But I think its OK, just a bit odd.

~/git$ task --list-all
task: No Taskfile found at "" (or any of the parent directories until ownership changed). Run `task --init` to create a new Taskfile.

Fixes #1683