mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
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:
commit
a9ed98588e
@ -44,6 +44,15 @@ TMP_DIR="${TMP_DIR:-$(mktemp -d /tmp/update-vendor.XXXX)}"
|
|||||||
LOG_FILE="${LOG_FILE:-${TMP_DIR}/update-vendor.log}"
|
LOG_FILE="${LOG_FILE:-${TMP_DIR}/update-vendor.log}"
|
||||||
kube::log::status "logfile at ${LOG_FILE}"
|
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
|
if [ -z "${BASH_XTRACEFD:-}" ]; then
|
||||||
exec 19> "${LOG_FILE}"
|
exec 19> "${LOG_FILE}"
|
||||||
export BASH_XTRACEFD="19"
|
export BASH_XTRACEFD="19"
|
||||||
|
Loading…
Reference in New Issue
Block a user