Fix --hold not working with some programs that cause keyboard interrupt to be passed to python
This commit is contained in:
parent
1c9cf32735
commit
185c3320a4
@ -31,7 +31,10 @@ def runpy(args: List[str]) -> None:
|
|||||||
|
|
||||||
def hold(args: List[str]) -> None:
|
def hold(args: List[str]) -> None:
|
||||||
import subprocess
|
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
|
from kitty.utils import hold_till_enter
|
||||||
hold_till_enter()
|
hold_till_enter()
|
||||||
raise SystemExit(ret)
|
raise SystemExit(ret)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user