Fixes after updating mvdan.cc/sh

This commit is contained in:
Andrey Nering
2018-09-01 11:02:23 -03:00
parent f4a18e531f
commit 8bdf5c554d
5 changed files with 28 additions and 23 deletions

View File

@@ -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
}