fix: report OCI backup prerequisite failures

This commit is contained in:
juvenal.diaz 2026-10-27 14:02:19 -06:00
parent 92ff5590a6
commit 69a7e4a519
1 changed files with 4 additions and 3 deletions

View File

@ -28,9 +28,10 @@ if [[ "${ACTION}" != status && "${ACTION}" != plan && "${ACTION}" != upload && "
exit 2
fi
if [[ -z "${oci_bin}" || ! -r "${OCI_CONFIG}" || -z "${OCI_REGION}" || -z "${BUCKET}" ]]; then
exec "${REPO_ROOT}/scripts/oci-backup-status" "${ACTION}" 2>/dev/null || true
[[ "${ACTION}" == status || "${ACTION}" == plan ]] && exit 1
echo "OCI backup prerequisites are incomplete; run ./jeannie backup oci status." >&2
"${REPO_ROOT}/scripts/oci-backup-status" "${ACTION}" || true
if [[ "${ACTION}" == upload || "${ACTION}" == restore-verify ]]; then
echo "OCI backup prerequisites are incomplete; complete oci-foundation apply and rerun backup oci status." >&2
fi
exit 1
fi