🐛 fix(hermes): 捕获键盘中断并优雅退出
This commit is contained in:
1 parent
f734a9f1a6
commit
9b8fd9f136
1 file changed
+5
-1
@@ -508,4 +508,8 @@ def main() -> int:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
raise SystemExit(main())
|
try:
|
||||||
|
raise SystemExit(main())
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\n已取消。", file=sys.stderr)
|
||||||
|
raise SystemExit(130)
|
||||||
Reference in new issue
Block a user