From df951a0c7cccd29cf672caff5748eb2c0046d5cf Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sun, 19 Aug 2018 16:23:32 -0300 Subject: [PATCH] Fix suggestion to use task --init not being shown anymore --- errors.go | 8 -------- internal/taskfile/read/taskfile.go | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/errors.go b/errors.go index f2d57b69..a12df253 100644 --- a/errors.go +++ b/errors.go @@ -10,14 +10,6 @@ var ( ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists") ) -type taskFileNotFound struct { - taskFile string -} - -func (err taskFileNotFound) Error() string { - return fmt.Sprintf(`task: No task file found (is it named "%s"?). Use "task --init" to create a new one`, err.taskFile) -} - type taskNotFoundError struct { taskName string } diff --git a/internal/taskfile/read/taskfile.go b/internal/taskfile/read/taskfile.go index e7c3b797..0c36380d 100644 --- a/internal/taskfile/read/taskfile.go +++ b/internal/taskfile/read/taskfile.go @@ -16,7 +16,7 @@ func Taskfile(dir string) (*taskfile.Taskfile, error) { path := filepath.Join(dir, "Taskfile.yml") t, err := readTaskfile(path) if err != nil { - return nil, err + return nil, fmt.Errorf(`No Taskfile.yml found. Use "task --init" to create a new one`) } path = filepath.Join(dir, fmt.Sprintf("Taskfile_%s.yml", runtime.GOOS))