diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-09-24 23:40:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-24 23:40:52 +0300 |
| commit | fee5cb697c77156f0dec4264ce846dd0d4f84fd5 (patch) | |
| tree | 3285c253624f75b104c28e71a0a81ac8caff1cc3 /mesonbuild/scripts/meson_exe.py | |
| parent | 68c23a61203fc35dd11c7a0b1cc13f7cc2c5cf8c (diff) | |
| parent | 5a69dbe0cb500fe1a2be2e07219b58b1edf443b5 (diff) | |
| download | meson-fee5cb697c77156f0dec4264ce846dd0d4f84fd5.tar.gz | |
Merge pull request #9167 from dcbaker/submit/meson-main-type-checking
Add type annotations and type checking to meson main
Diffstat (limited to 'mesonbuild/scripts/meson_exe.py')
| -rw-r--r-- | mesonbuild/scripts/meson_exe.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py index 9c1ae596c..dc89876be 100644 --- a/mesonbuild/scripts/meson_exe.py +++ b/mesonbuild/scripts/meson_exe.py @@ -32,7 +32,7 @@ def buildparser() -> argparse.ArgumentParser: parser.add_argument('--feed') return parser -def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[dict] = None) -> int: +def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[T.Dict[str, str]] = None) -> int: if exe.exe_runner: if not exe.exe_runner.found(): raise AssertionError('BUG: Can\'t run cross-compiled exe {!r} with not-found ' @@ -67,6 +67,9 @@ def run_exe(exe: ExecutableSerialisation, extra_env: T.Optional[dict] = None) -> close_fds=False, stdin=stdin, stdout=pipe, stderr=pipe) stdout, stderr = p.communicate() + if stdin is not None: + stdin.close() + if p.returncode == 0xc0000135: # STATUS_DLL_NOT_FOUND on Windows indicating a common problem that is otherwise hard to diagnose raise FileNotFoundError('due to missing DLLs') |
