Ver Fonte

Error if v2 porter.yaml specified, but not enabled on the project (#3472)

Stefan McShane há 2 anos atrás
pai
commit
36524f094d
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      cli/cmd/commands/apply.go

+ 2 - 0
cli/cmd/commands/apply.go

@@ -232,6 +232,8 @@ func apply(ctx context.Context, _ *types.GetAuthenticatedUserResponse, client ap
 
 			resGroup.Resources = append(resGroup.Resources, resources...)
 		}
+	} else if previewVersion.Version == "v2" {
+		return errors.New("porter.yaml v2 is not enabled for this project")
 	} else {
 		return fmt.Errorf("unknown porter.yaml version: %s", previewVersion.Version)
 	}