fix: a couple of fixes and improvements on task --init (#2433)

* Fixed check for an existing Taskfile: look for all possibilities, and
  not only `Taskfile.yml` specifically.
* Added a description (`desc`) to the `default` task. Important to at
  least `task --list` work by default (a core feature).
* Changed top comment to YAML language server comment.
This commit is contained in:
Andrey Nering
2025-12-07 17:29:51 -03:00
committed by GitHub
parent 9b99866224
commit 745633dc0e
5 changed files with 26 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ type FileNode struct {
func NewFileNode(entrypoint, dir string, opts ...NodeOption) (*FileNode, error) {
// Find the entrypoint file
resolvedEntrypoint, err := fsext.Search(entrypoint, dir, defaultTaskfiles)
resolvedEntrypoint, err := fsext.Search(entrypoint, dir, DefaultTaskfiles)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, errors.TaskfileNotFoundError{URI: entrypoint, Walk: false}