From 7a156d5ef30284ba0db22e864156e5596c9ccd6a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Feb 2022 11:16:08 +0530 Subject: [PATCH] Also fix --hold not working if program to be executed is not found --- __main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/__main__.py b/__main__.py index f47080ccc..4b419ace1 100644 --- a/__main__.py +++ b/__main__.py @@ -35,6 +35,10 @@ def hold(args: List[str]) -> None: ret = subprocess.Popen(args[1:]).wait() except KeyboardInterrupt: pass + except FileNotFoundError: + print(f'Could not find {args[1]!r} to execute', file=sys.stderr) + except Exception as e: + print(e, file=sys.stderr) from kitty.utils import hold_till_enter hold_till_enter() raise SystemExit(ret)