meson_exe: print suitable debug information for DLL not found errors

It's particularly inscrutable if you do not know where DLLs weren't
found because you don't know what the PATH was in the child process.
pull/11402/head
Eli Schwartz 2 years ago committed by Xavier Claessens
parent 40e27b14f1
commit 0b5e95ae71
  1. 3
      mesonbuild/scripts/meson_exe.py

@ -72,7 +72,8 @@ def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[T.Dict[str, str]
if p.returncode == 0xc0000135: if p.returncode == 0xc0000135:
# STATUS_DLL_NOT_FOUND on Windows indicating a common problem that is otherwise hard to diagnose # STATUS_DLL_NOT_FOUND on Windows indicating a common problem that is otherwise hard to diagnose
raise FileNotFoundError('due to missing DLLs') strerror = 'Failed to run due to missing DLLs, with path: ' + child_env['PATH']
raise FileNotFoundError(p.returncode, strerror, cmd_args)
if p.returncode != 0: if p.returncode != 0:
if exe.pickled: if exe.pickled:

Loading…
Cancel
Save