Skip to content

Commit

Permalink
fix(state): index out of range crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-pad committed Feb 21, 2023
1 parent a965dca commit cf55b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controllers/terraformlayer/states.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ func getRemediationStrategy(repo *configv1alpha1.TerraformRepository, layer *con

func getStateString(state State) string {
t := strings.Split(fmt.Sprintf("%T", state), "/")
return t[len(t)]
return t[len(t)-1]
}

0 comments on commit cf55b40

Please sign in to comment.