Skip to content

Commit ccd7b34

Browse files
authored
Merge pull request kubernetes#129629 from bobsongplus/master
Fix: touch /dev/null permission denied on macos
2 parents 488fac4 + c911ddd commit ccd7b34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

staging/src/k8s.io/code-generator/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)