From 1775fffc0b093bf858d74d16b10970a857b2cb9d Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 3 Jul 2023 13:31:29 -0400 Subject: [PATCH] [lit] allow find git usr bin in path directly. (#5385) This is for case where git usr bin is not in winreg. --- utils/lit/lit/TestingConfig.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py index 24d7c448a6..b2dbcc6a53 100644 --- a/utils/lit/lit/TestingConfig.py +++ b/utils/lit/lit/TestingConfig.py @@ -64,7 +64,10 @@ def fromdefaults(litConfig): if sys.platform == 'win32': required_tools = [ 'cmp.exe', 'grep.exe', 'sed.exe', 'diff.exe', 'echo.exe', 'ls.exe'] - path = _find_git_windows_unix_tools(required_tools) + path = lit.util.whichTools(required_tools, all_path) + if path is None: + path = _find_git_windows_unix_tools(required_tools) + all_path = f"{path};{all_path}" environment = { 'PATH' : all_path,