Skip to content

Commit 9cec273

Browse files
committed
Set GOMODCACHE to avoid re-download toolchain
If we don't set this, k/k build script will set GOMODCACHE different from default, and re-download the toolchain (or fail to build for Kubernetes <= 1.29).
1 parent 98f2307 commit 9cec273

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

prow.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ run_with_go () {
441441
else
442442
version=local
443443
fi
444-
GOTOOLCHAIN=$version run "$@"
444+
# Set GOMODCACHE to make sure Kubernetes does not need to download again.
445+
GOTOOLCHAIN=$version GOMODCACHE="$(go env GOMODCACHE)" run "$@"
445446
}
446447

447448
# Ensure that we have the desired version of kind.

0 commit comments

Comments
 (0)