debugruntest: fix .bat invocation for debugruntest on Windows

Summary:
As mentioned in D41793101, debugruntest on Windows had trouble invocating external binaries. This was in part due to an issue with `.bat` files, which this diff fixes.

 `debugruntest` creates shims for calling the original binaries and somewhat alters the path, including only the path to the shims and the path to hg (`.bat` files on Windows). The non-Windows shims worked fine, but the Windows ones had an issue since before this diff the paths on the shim were not quoted, making the desired binary not invokable (e.g. `C:\Program Files\Git\cmd\git.exe` unquoted failed because of the space on it).

Reviewed By: quark-zju

Differential Revision: D41825107

fbshipit-source-id: 5f73a52f62e468d44c35870d28319892fb69258d
This commit is contained in:
Saul Gutierrez 2022-12-07 19:54:24 -08:00 committed by Facebook GitHub Bot
parent 2e30eb56d2
commit ff62e70532

View File

@ -332,7 +332,7 @@ class TestTmp:
[
"@echo off",
f"set PATH={self._origpathenv}",
f"{fullpath} %*",
f'"{fullpath}" %*',
"exit /B %errorlevel%",
]
)