We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49af480 commit c5d2092Copy full SHA for c5d2092
precondition.go
@@ -2,6 +2,7 @@ package task
2
3
import (
4
"context"
5
+ "slices"
6
7
"github.com/go-task/task/v3/errors"
8
"github.com/go-task/task/v3/internal/env"
@@ -14,7 +15,7 @@ import (
14
15
var ErrPreconditionFailed = errors.New("task: precondition not met")
16
17
func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *ast.Task) (bool, error) {
- for _, p := range append(t.Preconditions, e.Taskfile.Preconditions.Preconditions...) {
18
+ for _, p := range slices.Concat(e.Taskfile.Preconditions.Preconditions, t.Preconditions) {
19
err := execext.RunCommand(ctx, &execext.RunCommandOptions{
20
Command: p.Sh,
21
Dir: t.Dir,
0 commit comments