Better handeling of keyboard interupts.

This commit is contained in:
Sleepy Monax 2022-07-15 22:15:09 +02:00
parent a82f74ee68
commit fc8a5b9735

View file

@ -153,6 +153,8 @@ def runCmd(*args: str) -> bool:
proc = subprocess.run(args)
except FileNotFoundError:
raise CliException(f"Failed to run {args[0]}: command not found")
except KeyboardInterrupt:
raise CliException("Interrupted")
if proc.returncode == -signal.SIGSEGV:
raise CliException("Segmentation fault")