mirror of https://github.com/astral-sh/uv
Avoid crashing on setup tools fatal errors
This commit is contained in:
parent
4c9de3883c
commit
9c25fc9787
|
|
@ -138,10 +138,14 @@ def run_once(stdin: TextIO, stdout: TextIO):
|
||||||
# Respect SIGTERM and SIGINT
|
# Respect SIGTERM and SIGINT
|
||||||
|
|
||||||
if (
|
if (
|
||||||
isinstance(exc, (SystemExit, KeyboardInterrupt))
|
isinstance(exc, SystemExit)
|
||||||
|
# setutools will throw `SystemExit` on incorrect usage so do not treat
|
||||||
|
# it as a SIGTERM
|
||||||
and build_backend_name != "setuptools.build_meta:__legacy__"
|
and build_backend_name != "setuptools.build_meta:__legacy__"
|
||||||
):
|
):
|
||||||
raise
|
raise
|
||||||
|
elif isinstance(exc, KeyboardInterrupt):
|
||||||
|
raise
|
||||||
|
|
||||||
raise HookRuntimeError(exc) from exc
|
raise HookRuntimeError(exc) from exc
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue