Skip to content

Commit

Permalink
Remove nested if else
Browse files Browse the repository at this point in the history
  • Loading branch information
rquitales committed Sep 13, 2023
1 parent 385a289 commit 2f1acec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions provider/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ func (k *kubeProvider) Diff(ctx context.Context, req *pulumirpc.DiffRequest) (*p
// Delete before replacement if we are forced to replace the old object, and the new version of
// that object MUST have the same name.
deleteBeforeReplace :=
// 1. We know resource must be replaced.
// 1. We know resource must be replaced.
len(replaces) > 0 &&
// 2. Object is NOT autonamed (i.e., user manually named it, and therefore we can't
// auto-generate the name).
Expand Down Expand Up @@ -1958,7 +1958,8 @@ func (k *kubeProvider) Read(ctx context.Context, req *pulumirpc.ReadRequest) (*p
"configured Kubernetes cluster is unreachable and the `deleteUnreachable` option is enabled. "+
"Deleting the unreachable resource from Pulumi state"))
return deleteResponse, nil
} else if k.skipUpdateUnreachable {
}
if k.skipUpdateUnreachable {
_ = k.host.Log(ctx, diag.Info, urn, fmt.Sprintf(
"configured Kubernetes cluster is unreachable and the `skipUnreachable` option is enabled. "+
"Returned data could not reflect the actual cluster configuration."))
Expand Down

0 comments on commit 2f1acec

Please sign in to comment.