Fix CheckDirMetadataFormat for Windows
The CheckDirMetadataFormat presubmit on Windows should run dirmd.bat
rather than dirmd. While Windows seems to handle 'dirmd' as a valid
executable name it may be better to specify the actual file to be run,
at least for consistency with other places where we do this translation.
Bug: 1309977
Change-Id: Icac7cd10f3021aef6a47cfdafb7670ed9cfe8980
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3554262
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#985985}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index ed7fc6f8..8bd4392 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -4479,8 +4479,9 @@
input_api.RunTests(
input_api.canned_checks.CheckVPythonSpec(input_api, output_api)))
+ dirmd = 'dirmd.bat' if input_api.is_windows else 'dirmd'
dirmd_bin = input_api.os_path.join(input_api.PresubmitLocalPath(),
- 'third_party', 'depot_tools', 'dirmd')
+ 'third_party', 'depot_tools', dirmd)
results.extend(
input_api.RunTests(
input_api.canned_checks.CheckDirMetadataFormat(