소스 검색

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>
Will Harris 1 년 전
부모
커밋
246580c7b8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      git_cl.py

+ 1 - 1
git_cl.py

@@ -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)