diff --git a/cpp/scripts/run-clang-format.py b/cpp/scripts/run-clang-format.py index 56fc9a5928..2545907688 100755 --- a/cpp/scripts/run-clang-format.py +++ b/cpp/scripts/run-clang-format.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2022, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -64,7 +64,7 @@ def parse_args(): args.dstdir = tempfile.mkdtemp() ret = subprocess.check_output("%s --version" % args.exe, shell=True) ret = ret.decode("utf-8") - version = VERSION_REGEX.match(ret) + version = VERSION_REGEX.search(ret) if version is None: raise Exception("Failed to figure out clang-format version!") version = version.group(1)