From 418107f95b5c6335ff42c49a84a7d74001d28d67 Mon Sep 17 00:00:00 2001 From: Akash Manohar Date: Fri, 28 Jul 2023 16:08:38 +0700 Subject: [PATCH] Only attempt to delete kind if it exists Signed-off-by: Akash Manohar --- .github/workflows/actions.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index be62c8855..71631fa25 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -113,8 +113,8 @@ jobs: KIND_VERSION: v0.17.0 KIND_URL: https://kind.sigs.k8s.io/dl run: | - echo $(which kind) - sudo rm $(which kind) + echo "Existing kind binary path: $(which kind)" + if [[ -s $(which kind) ]]; then sudo rm $(which kind); fi wget -O kind "$KIND_URL/$KIND_VERSION/kind-linux-amd64" --progress=dot:giga; chmod +x ./kind sudo mv ./kind /usr/local/bin/kind @@ -221,8 +221,8 @@ jobs: KIND_VERSION: v0.17.0 KIND_URL: https://kind.sigs.k8s.io/dl run: | - echo $(which kind) - sudo rm $(which kind) + echo "Existing kind binary path: $(which kind)" + if [[ -s $(which kind) ]]; then sudo rm $(which kind); fi wget -O kind "$KIND_URL/$KIND_VERSION/kind-linux-amd64" --progress=dot:giga; chmod +x ./kind sudo mv ./kind /usr/local/bin/kind @@ -792,8 +792,8 @@ jobs: KIND_VERSION: v0.17.0 KIND_URL: https://kind.sigs.k8s.io/dl run: | - echo $(which kind) - sudo rm $(which kind) + echo "Existing kind binary path: $(which kind)" + if [[ -s $(which kind) ]]; then sudo rm $(which kind); fi wget -O kind "$KIND_URL/$KIND_VERSION/kind-linux-amd64" --progress=dot:giga; chmod +x ./kind sudo mv ./kind /usr/local/bin/kind @@ -872,8 +872,8 @@ jobs: KIND_VERSION: v0.17.0 KIND_URL: https://kind.sigs.k8s.io/dl run: | - echo $(which kind) - sudo rm $(which kind) + echo "Existing kind binary path: $(which kind)" + if [[ -s $(which kind) ]]; then sudo rm $(which kind); fi wget -O kind "$KIND_URL/$KIND_VERSION/kind-linux-amd64" --progress=dot:giga; chmod +x ./kind sudo mv ./kind /usr/local/bin/kind @@ -942,8 +942,8 @@ jobs: KIND_VERSION: v0.17.0 KIND_URL: https://kind.sigs.k8s.io/dl run: | - echo $(which kind) - sudo rm $(which kind) + echo "Existing kind binary path: $(which kind)" + if [[ -s $(which kind) ]]; then sudo rm $(which kind); fi wget -O kind "$KIND_URL/$KIND_VERSION/kind-linux-amd64" --progress=dot:giga; chmod +x ./kind sudo mv ./kind /usr/local/bin/kind