Skip to content

Commit

Permalink
chore: remove the retrylog hook from the init view
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Schaatsbergen <[email protected]>
  • Loading branch information
bschaatsbergen committed Nov 1, 2024
1 parent fb87888 commit ecbb274
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions internal/command/views/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ import (
"time"

"github.com/hashicorp/terraform/internal/command/arguments"
"github.com/hashicorp/terraform/internal/terraform"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// The Init view is used for the init command.
type Init interface {
Diagnostics(diags tfdiags.Diagnostics)
Hooks() []terraform.Hook
Output(messageCode InitMessageCode, params ...any)
LogInitMessage(messageCode InitMessageCode, params ...any)
Log(message string, params ...any)
Expand Down Expand Up @@ -52,12 +50,6 @@ func (v *InitHuman) Diagnostics(diags tfdiags.Diagnostics) {
v.view.Diagnostics(diags)
}

func (v *InitHuman) Hooks() []terraform.Hook {
return []terraform.Hook{
NewRetryLoghook(v.view),
}
}

func (v *InitHuman) Output(messageCode InitMessageCode, params ...any) {
v.view.streams.Println(v.PrepareMessage(messageCode, params...))
}
Expand Down Expand Up @@ -98,12 +90,6 @@ func (v *InitJSON) Diagnostics(diags tfdiags.Diagnostics) {
v.view.Diagnostics(diags)
}

func (v *InitJSON) Hooks() []terraform.Hook {
return []terraform.Hook{
NewRetryLoghook(v.view.view),
}
}

func (v *InitJSON) Output(messageCode InitMessageCode, params ...any) {
// don't add empty messages to json output
preppedMessage := v.PrepareMessage(messageCode, params...)
Expand Down

0 comments on commit ecbb274

Please sign in to comment.