1
0
mirror of https://github.com/go-task/task.git synced 2025-06-23 00:38:19 +02:00

feat: enforce gofumpt linter

This commit is contained in:
Pete Davison
2023-03-31 19:13:29 +00:00
committed by Andrey Nering
parent aab51c331f
commit 09c9094a6b
24 changed files with 84 additions and 70 deletions

View File

@ -10,10 +10,8 @@ import (
"github.com/go-task/task/v3/taskfile"
)
var (
// ErrPreconditionFailed is returned when a precondition fails
ErrPreconditionFailed = errors.New("task: precondition not met")
)
// ErrPreconditionFailed is returned when a precondition fails
var ErrPreconditionFailed = errors.New("task: precondition not met")
func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *taskfile.Task) (bool, error) {
for _, p := range t.Preconditions {
@ -22,7 +20,6 @@ func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *taskfile.Task
Dir: t.Dir,
Env: env.Get(t),
})
if err != nil {
e.Logger.Errf(logger.Magenta, "task: %s", p.Msg)
return false, ErrPreconditionFailed