Module: Mesa Branch: main Commit: d8b38ec4a37da8f5248141bbdea79934ab8b266e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8b38ec4a37da8f5248141bbdea79934ab8b266e
Author: Eric Engestrom <[email protected]> Date: Sun Aug 7 19:44:58 2022 +0100 vk/update-aliases.py: handle "no match" grep call This was not necessary before because there was always at least the vk.xml file itself in the `src/` search path. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484> --- src/vulkan/registry/update-aliases.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vulkan/registry/update-aliases.py b/src/vulkan/registry/update-aliases.py index f44b7607aa2..8ef3201b2bf 100755 --- a/src/vulkan/registry/update-aliases.py +++ b/src/vulkan/registry/update-aliases.py @@ -88,12 +88,18 @@ def main(paths: list[str]): # be extremely slow. files_with_aliases = set() for aliases_chunk in chunks([*aliases], 500): - search_output = subprocess.check_output([ + grep_cmd = [ 'git', 'grep', '-rlP', '|'.join(aliases_chunk), - ] + paths, stderr=subprocess.DEVNULL).decode() + ] + paths + search_output = subprocess.run( + grep_cmd, + check=False, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + ).stdout.decode() files_with_aliases.update(search_output.splitlines())
