Skip to content

Commit

Permalink
Fix: touch /dev/null permission denied on macos
Browse files Browse the repository at this point in the history
Signed-off-by: song <[email protected]>

Kubernetes-commit: 11c3bd3038dbf47abb71ff5b9f12e5889da2192f
  • Loading branch information
bobsongplus authored and k8s-publishing-bot committed Jan 15, 2025
1 parent 1bfda81 commit 3ca838d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kube_codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3ca838d

Please sign in to comment.