diff options
| author | Eric Engestrom <eric@igalia.com> | 2025-10-06 19:00:33 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-06 12:53:22 -0700 |
| commit | 23828ced6810955e108aadd4ceb5fbf9c5965421 (patch) | |
| tree | 53ba57439abf1f24602f6525f831fcbc82056b1a /mesonbuild/scripts | |
| parent | a0450ed8c78d48ee4474ea71b4e8fddc90033884 (diff) | |
| download | meson-23828ced6810955e108aadd4ceb5fbf9c5965421.tar.gz | |
vcstagger: suppress errors when running vcs_tag() outside of a vcs clone (eg. tarball)
Instead of printing it out into the terminal, among other meson messages.
This is in response to https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37706
which wrapped the `git` into a whole multi-line `python` call just to do exactly
what this PR does: not show an irrelevant error when building from a tarball.
Diffstat (limited to 'mesonbuild/scripts')
| -rw-r--r-- | mesonbuild/scripts/vcstagger.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/scripts/vcstagger.py b/mesonbuild/scripts/vcstagger.py index ca94605c2..dacf2312d 100644 --- a/mesonbuild/scripts/vcstagger.py +++ b/mesonbuild/scripts/vcstagger.py @@ -8,7 +8,7 @@ import typing as T def config_vcs_tag(infile: str, outfile: str, fallback: str, source_dir: str, replace_string: str, regex_selector: str, cmd: T.List[str]) -> None: try: - output = subprocess.check_output(cmd, cwd=source_dir) + output = subprocess.check_output(cmd, cwd=source_dir, stderr=subprocess.DEVNULL) new_string = re.search(regex_selector, output.decode()).group(1).rstrip('\r\n') except Exception: new_string = fallback |
