From 246580c7b80617f291c257c0aa10c155574a7a05 Mon Sep 17 00:00:00 2001 From: Will Harris Date: Fri, 5 Apr 2024 22:14:36 +0000 Subject: [PATCH] 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 Commit-Queue: Will Harris --- git_cl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 803ef2462..97cf55427 100755 --- a/git_cl.py +++ b/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)