diff --git a/pkg/providers/tf/upgrade.go b/pkg/providers/tf/upgrade.go index 5c66947d6..c763185f2 100644 --- a/pkg/providers/tf/upgrade.go +++ b/pkg/providers/tf/upgrade.go @@ -107,7 +107,7 @@ func (provider *TerraformProvider) performTerraformUpgrade(ctx context.Context, if currentTfVersion.LessThan(version.Must(version.NewVersion("1.5.0"))) { return errors.New("upgrade only supported for Terraform versions >= 1.5.0") } else if currentTfVersion.LessThan(provider.tfBinContext.DefaultTfVersion) { - if provider.tfBinContext.TfUpgradePath == nil || len(provider.tfBinContext.TfUpgradePath) == 0 { + if len(provider.tfBinContext.TfUpgradePath) == 0 { return errors.New("tofu version mismatch and no upgrade path specified") } for _, targetTfVersion := range provider.tfBinContext.TfUpgradePath {