From 185c3320a491c815fc7fb242c72b42e1a9900696 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Feb 2022 11:12:33 +0530 Subject: [PATCH] Fix --hold not working with some programs that cause keyboard interrupt to be passed to python --- __main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__main__.py b/__main__.py index 362f3902c..f47080ccc 100644 --- a/__main__.py +++ b/__main__.py @@ -31,7 +31,10 @@ def runpy(args: List[str]) -> None: def hold(args: List[str]) -> None: import subprocess - ret = subprocess.Popen(args[1:]).wait() + try: + ret = subprocess.Popen(args[1:]).wait() + except KeyboardInterrupt: + pass from kitty.utils import hold_till_enter hold_till_enter() raise SystemExit(ret)