From 23828ced6810955e108aadd4ceb5fbf9c5965421 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 6 Oct 2025 19:00:33 +0200 Subject: 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. --- mesonbuild/scripts/vcstagger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/scripts') 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 -- cgit v1.2.3