From 0ef11cb101aa3584e59c8de20f0334294396c623 Mon Sep 17 00:00:00 2001 From: Ankitsinghsisodya Date: Wed, 1 Apr 2026 15:59:04 +0530 Subject: [PATCH] hack: use 'go env GOARCH' instead of fragile awk pipeline in install.sh The previous 'go env | grep GOARCH | awk -F\'' pipeline is fragile: it depends on the specific output format of 'go env' which can vary. 'go env GOARCH' is the canonical, documented way to read a single Go environment variable and is simpler and more reliable. --- hack/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/install.sh b/hack/install.sh index 5f5e547984a..bcb5614db43 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -30,7 +30,7 @@ fi export SCALE_CHAOSDUCK_TO_ZERO=1 export REPLICAS=1 -KO_ARCH=$(go env | grep GOARCH | awk -F\' '{print $2}') +KO_ARCH=$(go env GOARCH) export KO_FLAGS=${KO_FLAGS:-"--platform=linux/$KO_ARCH"}