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

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

commit b8a2d90bb12725d22cf0e9e54489c1337161620b
Author: phantomjinx <p.g.richard...@phantomjinx.co.uk>
AuthorDate: Fri Oct 14 14:03:45 2022 +0100

    (e2e): Fixes error in kustomize removal check
    
    Stops exit 1 happening if kustomize not available
---
 .github/actions/kamel-prepare-env/action.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.github/actions/kamel-prepare-env/action.yml 
b/.github/actions/kamel-prepare-env/action.yml
index 3fe70aa0a..120d6fc7b 100644
--- a/.github/actions/kamel-prepare-env/action.yml
+++ b/.github/actions/kamel-prepare-env/action.yml
@@ -79,9 +79,12 @@ runs:
       if: ${{ env.KAMEL_PREPARE_ENV != 'true' }}
       run: |
         # reinstall kustomize to be always on the same version
-        if [ $(which kustomize) == "0" ]; then
+        set +e
+        $(which kustomize &> /dev/null)
+        if [ "$?" == "0" ]; then
           ${{ env.SUDO }} rm $(which kustomize)
         fi
+        set -e
         make kustomize
 
         # Add kustomize to PATH

Reply via email to