Prevent kubectl_bin from unexpected exit
@@ -424,7 +424,7 @@ deploy_cert_manager() {
}
kubectl_bin() {
-
+ set +o errexit
timeout=4
redirect_item=('2>&1')
redirect_stderr=$(printf '%s\n' "${@}" | grep -o '2>&1' || true)
@@ -436,7 +436,6 @@ kubectl_bin() {
else
output=$(kubectl "$@")
fi
-
exit_status="$?"
if [[ ${exit_status} != 0 ]]; then
@@ -448,4 +447,5 @@ kubectl_bin() {
done
echo "${output}"
return ${exit_status}
+ set -o errexit
}
