Merge pull request #99596 from SataQiu/fix-update-vendor-20210301

Fix the bug that hack/update-vendor.sh exits with error but no indication of failure
This commit is contained in:
Kubernetes Prow Robot 2021-04-08 15:58:48 -07:00 committed by GitHub
commit a9ed98588e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,15 @@ TMP_DIR="${TMP_DIR:-$(mktemp -d /tmp/update-vendor.XXXX)}"
LOG_FILE="${LOG_FILE:-${TMP_DIR}/update-vendor.log}"
kube::log::status "logfile at ${LOG_FILE}"
function finish {
ret=$?
if [[ ${ret} != 0 ]]; then
echo "An error has occurred. Please see more details in ${LOG_FILE}"
fi
exit ${ret}
}
trap finish EXIT
if [ -z "${BASH_XTRACEFD:-}" ]; then
exec 19> "${LOG_FILE}"
export BASH_XTRACEFD="19"