Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ebe3ef

Browse files
bobsongplusk8s-publishing-bot
authored andcommitted
Fix: touch /dev/null permission denied on macos
Signed-off-by: song <[email protected]> Kubernetes-commit: c5958ed88986bd4d828d4698dca3782b5c83fec9
1 parent f74ea3c commit 0ebe3ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kube_codegen.sh

Lines changed: 4 additions & 1 deletion
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)