Explicitly call vpython3 to launch the mojom formatter

Before this change, on Windows launching the .py file would open it
with the system default handler (none, or notepad.exe) instead of
launching it with python.

This CL fixes this issue. Tested manually on Linux and Windows and
seems to work on both OS.

BUG=332935377

Change-Id: I8ef348c59dd08a4b5c2099f04968622aaa0927d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5427704
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Will Harris <wfh@chromium.org>
changes/04/5427704/4
Will Harris 1 year ago committed by LUCI CQ
parent e8745d8bf3
commit 246580c7b8

@ -6351,7 +6351,7 @@ def _RunMojomFormat(opts, paths, top_dir, upstream_commit):
DieWithError('Could not find mojom formater at '
f'"{mojom_format_path}"')
cmd = [mojom_format_path]
cmd = ['vpython3', mojom_format_path]
if opts.dry_run:
cmd.append('--dry-run')
cmd.extend(paths)

Loading…
Cancel
Save