Skip to content

Commit

Permalink
migrate to v12: emit non-zero exit code on error
Browse files Browse the repository at this point in the history
This is a convenience for automated upgrades to be able to detect
errored command from the outside.
  • Loading branch information
fenekku committed Aug 20, 2024
1 parent 5434f1e commit ffd574a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- drafts visible
- records visible
"""
import sys

from click import secho
from flask import current_app
Expand Down Expand Up @@ -184,6 +185,8 @@ def update_record(record):
)
secho(msg, fg="yellow", err=True)

sys.exit(1)


# if the script is executed on its own, perform the upgrade
if __name__ == "__main__":
Expand Down

0 comments on commit ffd574a

Please sign in to comment.