From 56da06b6dd93208915177dd904da231178a39aea Mon Sep 17 00:00:00 2001 From: carlory Date: Sun, 10 Mar 2024 23:44:10 +0800 Subject: [PATCH] Fix the dirname command in macOS does not have a -z option --- hack/update-go-workspace.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/update-go-workspace.sh b/hack/update-go-workspace.sh index 72c6ad905fd..6dcbbffe999 100755 --- a/hack/update-go-workspace.sh +++ b/hack/update-go-workspace.sh @@ -35,6 +35,7 @@ cd "${KUBE_ROOT}" # Ensure all modules are included in go.work go work edit -use . git ls-files -z ':(glob)./staging/src/k8s.io/*/go.mod' \ - | xargs -0 -n1 dirname -z \ + | xargs -0 -n1 dirname \ + | tr '\n' '\0' \ | xargs -0 -n1 go work edit -use go mod download # generate go.work.sum