treblereel commented on code in PR #2465:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2465#discussion_r1742612744


##########
packages/kn-plugin-workflow/pkg/command/deploy.go:
##########
@@ -202,3 +203,18 @@ func runDeployCmdConfig(cmd *cobra.Command) (cfg 
DeployUndeployCmdConfig, err er
 
        return cfg, nil
 }
+
+func CheckCRDs(crds []string, typeName string) error {
+       for _, crd := range crds {
+               err := common.CheckCrdExists(crd)
+               if err != nil {
+                       var statusErr *apierrors.StatusError
+                       if errors.As(err, &statusErr) && 
statusErr.ErrStatus.Reason == metav1.StatusReasonNotFound {
+                               return fmt.Errorf("❌ ERROR: the required CRDs 
are not installed.. Install the %s CRD first", typeName)

Review Comment:
   Depending on the case, there are `Install the SonataFlow Operator CRD first` 
or  `Install the Knative Serving and Knative Eventing CRD first`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to