This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new a0ea758  fix: First bundle Kamelets install with client-side apply
a0ea758 is described below

commit a0ea7586585f4fad54a0ffcfa5e4d3459fe8dd4c
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Wed Dec 8 10:52:18 2021 +0100

    fix: First bundle Kamelets install with client-side apply
---
 pkg/install/kamelets.go | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pkg/install/kamelets.go b/pkg/install/kamelets.go
index e0f353e..53d7c2b 100644
--- a/pkg/install/kamelets.go
+++ b/pkg/install/kamelets.go
@@ -125,14 +125,16 @@ func applyKamelet(ctx context.Context, c client.Client, 
path string, namespace s
                err := serverSideApply(ctx, c, kamelet)
                switch {
                case err == nil:
-                       break
+                       return nil
                case isIncompatibleServerError(err):
                        hasServerSideApply = false
                default:
                        return fmt.Errorf("could not apply Kamelet from file 
%q: %w", path, err)
                }
-       } else {
-               return clientSideApply(ctx, c, kamelet)
+       }
+       err = clientSideApply(ctx, c, kamelet)
+       if err != nil {
+               return fmt.Errorf("could not apply Kamelet from file %q: %w", 
path, err)
        }
 
        return nil

Reply via email to