-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm that each journal can be parsed during upgrade, and abort upgrade if not #650
Conversation
…nd aborting upgrade if not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one change.
jrnl/upgrade.py
Outdated
) | ||
|
||
util.prompt("Aborting upgrade.") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use an exception here instead of returning. Once this function returns, a bunch of other code will still run (like upgrading the config), and not fully abort the upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - just made the change.
Handling it in install.py to prevent config from being overwritten when upgrade fails
util.prompt("Aborting upgrade. Exiting.") | ||
util.prompt("Aborting upgrade.") | ||
util.prompt("Please tell us about this problem at the following URL:") | ||
util.prompt("https://github.com/jrnl-org/jrnl/issues/new?title=UpgradeValidationException") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
And aborting upgrade if not.
This change also moves upgrade-related tests into their own upgrade.feature file.