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