Skip to content

Commit bf31d22

Browse files
authored
chore(tests): source helm-git a single time (#289)
1 parent a5793c2 commit bf31d22

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

helm-git-plugin.sh

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
set -eu
66

7+
# Mark this shell
8+
# shellcheck disable=SC2034
9+
HELM_GIT_SOURCE=1
10+
711
bin_name="helm-git"
812
readonly bin_name
913
allowed_protocols="https http file ssh"

tests/test-helper.bash

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
export HELM_GIT_DEBUG=1
44
export HELM_GIT_DIRNAME="$BATS_TEST_DIRNAME/.."
55

6-
# shellcheck source=helm-git-plugin.sh
7-
source "$HELM_GIT_DIRNAME/helm-git-plugin.sh"
6+
if [ -z "$HELM_GIT_SOURCE" ]; then
7+
# shellcheck source=helm-git-plugin.sh
8+
source "$HELM_GIT_DIRNAME/helm-git-plugin.sh"
9+
fi
810

911
function _run_helm_git() { run main '' '' '' "$1"; }
1012

0 commit comments

Comments
 (0)