mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Fix truncated logfile in verify-vendor
Writing to /dev/stderr causes a new FD to be opened. If this is a literal file, that file can get truncated. `>&2` does not suffer the same problem.
This commit is contained in:
parent
04c2b1fbdc
commit
7cbef7b26f
@ -187,11 +187,11 @@ fi
|
|||||||
# Loop through every vendored package
|
# Loop through every vendored package
|
||||||
for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
|
for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
|
||||||
if [[ -e "staging/src/${PACKAGE}" ]]; then
|
if [[ -e "staging/src/${PACKAGE}" ]]; then
|
||||||
echo "${PACKAGE} is a staging package, skipping" > /dev/stderr
|
echo "${PACKAGE} is a staging package, skipping" >&2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [[ ! -e "${DEPS_DIR}/${PACKAGE}" ]]; then
|
if [[ ! -e "${DEPS_DIR}/${PACKAGE}" ]]; then
|
||||||
echo "${PACKAGE} doesn't exist in ${DEPS_DIR}, skipping" > /dev/stderr
|
echo "${PACKAGE} doesn't exist in ${DEPS_DIR}, skipping" >&2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "${PACKAGE}"
|
echo "${PACKAGE}"
|
||||||
@ -214,7 +214,7 @@ for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
|
|||||||
file="${CONTENT[${PACKAGE}-COPYING]-}"
|
file="${CONTENT[${PACKAGE}-COPYING]-}"
|
||||||
fi
|
fi
|
||||||
if [[ -z "${file}" ]]; then
|
if [[ -z "${file}" ]]; then
|
||||||
cat > /dev/stderr << __EOF__
|
cat >&2 << __EOF__
|
||||||
No license could be found for ${PACKAGE} - aborting.
|
No license could be found for ${PACKAGE} - aborting.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
Loading…
Reference in New Issue
Block a user