From bf31d2276d04074f58fcb07c8e68f5da44c17729 Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Tue, 9 Jul 2024 17:41:03 +0200 Subject: [PATCH] chore(tests): source helm-git a single time (#289) --- helm-git-plugin.sh | 4 ++++ tests/test-helper.bash | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/helm-git-plugin.sh b/helm-git-plugin.sh index e400ea32..68b5a163 100755 --- a/helm-git-plugin.sh +++ b/helm-git-plugin.sh @@ -4,6 +4,10 @@ set -eu +# Mark this shell +# shellcheck disable=SC2034 +HELM_GIT_SOURCE=1 + bin_name="helm-git" readonly bin_name allowed_protocols="https http file ssh" diff --git a/tests/test-helper.bash b/tests/test-helper.bash index 9caf2185..6871efaf 100644 --- a/tests/test-helper.bash +++ b/tests/test-helper.bash @@ -3,8 +3,10 @@ export HELM_GIT_DEBUG=1 export HELM_GIT_DIRNAME="$BATS_TEST_DIRNAME/.." -# shellcheck source=helm-git-plugin.sh -source "$HELM_GIT_DIRNAME/helm-git-plugin.sh" +if [ -z "$HELM_GIT_SOURCE" ]; then + # shellcheck source=helm-git-plugin.sh + source "$HELM_GIT_DIRNAME/helm-git-plugin.sh" +fi function _run_helm_git() { run main '' '' '' "$1"; }