Skip to content

Commit 3ca838d

Browse files
bobsongplusk8s-publishing-bot
authored andcommitted
Fix: touch /dev/null permission denied on macos
Signed-off-by: song <[email protected]> Kubernetes-commit: 11c3bd3038dbf47abb71ff5b9f12e5889da2192f
1 parent 1bfda81 commit 3ca838d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kube_codegen.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ function kube::codegen::gen_openapi() {
368368
"${input_pkgs[@]}"
369369
fi
370370

371-
touch "${report}" # in case it doesn't exist yet
371+
if [ ! -e "${report}" ]; then
372+
touch "${report}" # in case it doesn't exist yet
373+
fi
374+
372375
if ! diff -u "${report}" "${new_report}"; then
373376
echo -e "ERROR:"
374377
echo -e "\tAPI rule check failed for ${report}: new reported violations"

0 commit comments

Comments
 (0)