Skip to content

Commit c5d819a

Browse files
authored
Merge pull request #27 from datum-cloud/fix/kubeconfig-env-var-fallback
fix: respect KUBECONFIG env var in external repo fallback
2 parents 9c7ef8a + ec23297 commit c5d819a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Taskfile.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ vars:
1111
sh: |
1212
if [ -f "cluster/kind-config.yaml" ] && [ -f "components/flux/kustomization.yaml" ]; then
1313
echo "./kubeconfig" # In test-infra repo
14+
elif [ -n "$KUBECONFIG" ] && [ -f "$KUBECONFIG" ]; then
15+
echo "$KUBECONFIG" # External repo: use KUBECONFIG env var if set and file exists
1416
else
15-
echo ".test-infra/kubeconfig" # External repo
17+
echo ".test-infra/kubeconfig" # External repo: default fallback
1618
fi
1719
# Detect if we're running in the test-infra repo or externally
1820
REPO_DIR:

0 commit comments

Comments
 (0)