We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1241daf commit 4be2fb6Copy full SHA for 4be2fb6
nonebot_plugin_orm/__init__.py
@@ -82,9 +82,12 @@ async def init_orm() -> None:
82
cmd_opts.cmd = (migrate.check, [], [])
83
try:
84
await greenlet_spawn(migrate.check, alembic_config)
85
- except click.UsageError:
86
- if not click.confirm("目标数据库未更新到最新迁移, 是否更新?"):
87
- raise
+ except click.UsageError as e:
+ try:
+ click.confirm("目标数据库未更新到最新迁移, 是否更新?", abort=True)
88
+ except click.Abort:
89
+ raise e
90
+
91
cmd_opts.cmd = (migrate.upgrade, [], [])
92
await greenlet_spawn(migrate.upgrade, alembic_config)
93
else:
0 commit comments