mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +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
|
||||
for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
|
||||
if [[ -e "staging/src/${PACKAGE}" ]]; then
|
||||
echo "${PACKAGE} is a staging package, skipping" > /dev/stderr
|
||||
echo "${PACKAGE} is a staging package, skipping" >&2
|
||||
continue
|
||||
fi
|
||||
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
|
||||
fi
|
||||
echo "${PACKAGE}"
|
||||
@ -214,7 +214,7 @@ for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
|
||||
file="${CONTENT[${PACKAGE}-COPYING]-}"
|
||||
fi
|
||||
if [[ -z "${file}" ]]; then
|
||||
cat > /dev/stderr << __EOF__
|
||||
cat >&2 << __EOF__
|
||||
No license could be found for ${PACKAGE} - aborting.
|
||||
|
||||
Options:
|
||||
|
Loading…
Reference in New Issue
Block a user