diff --git a/tfexec/errors.go b/tfexec/errors.go index e7a6c804..75e62ae1 100644 --- a/tfexec/errors.go +++ b/tfexec/errors.go @@ -130,13 +130,8 @@ func (e *ErrVersionMismatch) Error() string { } func (e *ErrVersionMismatch) Is(target error) bool { - err, ok := target.(*ErrVersionMismatch) - if !ok { - return false - } - return err.Actual == e.Actual && - err.MaxExclusive == e.MaxExclusive && - err.MinInclusive == e.MinInclusive + _, ok := target.(*ErrVersionMismatch) + return ok } type ErrNoInit struct {