Skip to content

Commit

Permalink
remove exit error types
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Jan 10, 2023
1 parent e83dcd9 commit 40f9679
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 436 deletions.
2 changes: 1 addition & 1 deletion tfexec/cmd_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (tf *Terraform) runTerraformCmd(ctx context.Context, cmd *exec.Cmd) error {
err = ctx.Err()
}
if err != nil {
return tf.wrapExitError(ctx, err, "")
return err
}

var errStdout, errStderr error
Expand Down
8 changes: 4 additions & 4 deletions tfexec/cmd_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (tf *Terraform) runTerraformCmd(ctx context.Context, cmd *exec.Cmd) error {
err = ctx.Err()
}
if err != nil {
return tf.wrapExitError(ctx, err, "")
return err
}

var errStdout, errStderr error
Expand All @@ -75,15 +75,15 @@ func (tf *Terraform) runTerraformCmd(ctx context.Context, cmd *exec.Cmd) error {
err = ctx.Err()
}
if err != nil {
return tf.wrapExitError(ctx, err, errBuf.String())
return err
}

// Return error if there was an issue reading the std out/err
if errStdout != nil && ctx.Err() != nil {
return tf.wrapExitError(ctx, errStdout, errBuf.String())
return errStdout
}
if errStderr != nil && ctx.Err() != nil {
return tf.wrapExitError(ctx, errStderr, errBuf.String())
return errStderr
}

return nil
Expand Down
345 changes: 0 additions & 345 deletions tfexec/exit_errors.go

This file was deleted.

Loading

0 comments on commit 40f9679

Please sign in to comment.