Merge pull request #129740 from bobsongplus/automated-cherry-pick-of-#129629-upstream-release-1.32

Automated cherry pick of #129629: Fix: touch /dev/null permission denied on macos
This commit is contained in:
Kubernetes Prow Robot 2025-01-28 04:19:30 -08:00 committed by GitHub
commit ce39aed39e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -368,7 +368,10 @@ function kube::codegen::gen_openapi() {
"${input_pkgs[@]}"
fi
touch "${report}" # in case it doesn't exist yet
if [ ! -e "${report}" ]; then
touch "${report}" # in case it doesn't exist yet
fi
if ! diff -u "${report}" "${new_report}"; then
echo -e "ERROR:"
echo -e "\tAPI rule check failed for ${report}: new reported violations"