mirror of
https://github.com/go-task/task.git
synced 2026-06-25 13:46:13 +00:00
Fixes after updating mvdan.cc/sh
This commit is contained in:
8
task.go
8
task.go
@@ -19,7 +19,6 @@ import (
|
||||
|
||||
"github.com/Masterminds/semver"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"mvdan.cc/sh/interp"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -198,7 +197,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error {
|
||||
e.Logger.VerboseErrf("task: error cleaning status on error: %v", err2)
|
||||
}
|
||||
|
||||
if _, ok := err.(interp.ExitCode); ok && t.IgnoreError {
|
||||
if execext.IsExitError(err) && t.IgnoreError {
|
||||
e.Logger.VerboseErrf("task: task error ignored: %v", err)
|
||||
continue
|
||||
}
|
||||
@@ -243,8 +242,7 @@ func (e *Executor) runCommand(ctx context.Context, t *taskfile.Task, call taskfi
|
||||
defer stdOut.Close()
|
||||
defer stdErr.Close()
|
||||
|
||||
err := execext.RunCommand(&execext.RunCommandOptions{
|
||||
Context: ctx,
|
||||
err := execext.RunCommand(ctx, &execext.RunCommandOptions{
|
||||
Command: cmd.Cmd,
|
||||
Dir: t.Dir,
|
||||
Env: getEnviron(t),
|
||||
@@ -252,7 +250,7 @@ func (e *Executor) runCommand(ctx context.Context, t *taskfile.Task, call taskfi
|
||||
Stdout: stdOut,
|
||||
Stderr: stdErr,
|
||||
})
|
||||
if _, ok := err.(interp.ExitCode); ok && cmd.IgnoreError {
|
||||
if execext.IsExitError(err) && cmd.IgnoreError {
|
||||
e.Logger.VerboseErrf("task: command error ignored: %v", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user