diff --git a/tfexec/errors.go b/tfexec/errors.go index 26e38ed0..010b3887 100644 --- a/tfexec/errors.go +++ b/tfexec/errors.go @@ -29,9 +29,8 @@ var ( ) func (tf *Terraform) parseError(err error, stderr string) error { - // if not an ExitError, just return it, do not try to parse - var ee *exec.ExitError - if !errors.As(err, &ee) { + ee, ok := err.(*exec.ExitError) + if !ok { return err }