From cdfcd9aba8d6ccb5aa0a1232bfb3e78b6d0271a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 17 Aug 2023 10:15:34 +0200 Subject: [PATCH] tests: commob: Don't fail if yq is not part of the cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This may happen on external runners. Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit 790bd3548d30aa205efd171736ecdcc9b7aacb1a) --- tests/common.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.bash b/tests/common.bash index 5e5f833ef3..08b82601bf 100644 --- a/tests/common.bash +++ b/tests/common.bash @@ -338,7 +338,7 @@ function ensure_yq() { export GOPATH export PATH="${GOPATH}/bin:${PATH}" INSTALL_IN_GOPATH=true "${repo_root_dir}/ci/install_yq.sh" - hash -d yq # yq is preinstalled on GHA Ubuntu 22.04 runners so we clear Bash's PATH cache. + hash -d yq 2> /dev/null || true # yq is preinstalled on GHA Ubuntu 22.04 runners so we clear Bash's PATH cache. } # dependency: What we want to get the version from the versions.yaml file