"git cl format" is crashing on Windows (after formatting) |
|||||
Issue description
On my Windows machine "git cl format" formats my CL and then crashes with this output:
c:\src\chromium4\src>git cl format
Traceback (most recent call last):
File "C:\src\depot_tools\git_cl.py", line 4620, in <module>
sys.exit(main(sys.argv[1:]))
File "C:\src\depot_tools\git_cl.py", line 4602, in main
return dispatcher.execute(OptionParser(), argv)
File "C:\src\depot_tools\subcommand.py", line 252, in execute
return command(parser, args[1:])
File "C:\src\depot_tools\git_cl.py", line 4512, in CMDformat
stdout = RunCommand(cmd + [gn_diff_file], cwd=top_dir)
File "C:\src\depot_tools\git_cl.py", line 99, in RunCommand
return subprocess2.check_output(args, shell=False, **kwargs)
File "C:\src\depot_tools\subprocess2.py", line 524, in check_output
return check_call_out(args, stdout=PIPE, **kwargs)[0]
File "C:\src\depot_tools\subprocess2.py", line 484, in check_call_out
out, returncode = communicate(args, **kwargs)
File "C:\src\depot_tools\subprocess2.py", line 458, in communicate
proc = Popen(args, **kwargs)
File "C:\src\depot_tools\subprocess2.py", line 262, in __init__
% (str(e), kwargs.get('cwd'), args[0]))
OSError: Execution failed with error: [Error 2] The system cannot find the file specified.
Check that c:\src\chromium4\src or gn exist and have execution permission.
,
Apr 4 2016
,
Apr 4 2016
Hm... Maybe I'm doing it wrong, but I'm not able to reproduce. Here's what I did: * Get fresh copy of chromium using the 'googler' hermetic toolchain workflow * Make a new git branch * Modify a .cc file (base/callback_internal.cc) to have obviously wrong formatting. * commit the change to the branch * run `git cl format` * No crash: just a now-correctly formatted base/callback_internal.cc.
,
Apr 4 2016
,
Apr 4 2016
Thanks for checking. I'll investigate more on my end.
,
Apr 5 2016
Oh, and I ran `git cl format` from both cmd.exe as well as `git bash`. This was on windows 10.
,
Apr 28 2016
Just ran into this. To repro you need to have modified a gn file in your CL. The problem is that gn is a batch file on Windows but git_cl.py is trying to launch it with shell=False. I'm writing a quick patch to fix this.
,
Apr 28 2016
Ah cool! Glad you were able to catch it in the act :)
,
Apr 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/627d9002a6a0bfb5c2ac40619440e879c07079de commit 627d9002a6a0bfb5c2ac40619440e879c07079de Author: bsep@chromium.org <bsep@chromium.org> Date: Fri Apr 29 00:00:52 2016 Subprocess uses shell=True on Windows when launching GN. BUG= 600051 Review-Url: https://codereview.chromium.org/1917863009 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300311 0039d316-1c4b-4281-b951-d872f2087c98 [modify] https://crrev.com/627d9002a6a0bfb5c2ac40619440e879c07079de/git_cl.py
,
Apr 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/build.git/+/1380ac6f40add1ef5bc182c534b3b0caebd699cd commit 1380ac6f40add1ef5bc182c534b3b0caebd699cd Author: recipe-roller@chromium.org <recipe-roller@chromium.org> Date: Fri Apr 29 00:07:31 2016 Roll recipe dependencies (trivial). This is an automated CL created by the recipe roller. This CL rolls recipe changes from upstream projects (e.g. depot_tools) into downstream projects (e.g. tools/build). More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug (or complain) depot_tools: https://crrev.com/627d9002a6a0bfb5c2ac40619440e879c07079de Subprocess uses shell=True on Windows when launching GN. (bsep@chromium.org) R=bsep@chromium.org BUG= 600051 TBR=martiniss@chromium.org,phajdan.jr@chromium.org Review-Url: https://codereview.chromium.org/1933553002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/build@300312 0039d316-1c4b-4281-b951-d872f2087c98 [modify] https://crrev.com/1380ac6f40add1ef5bc182c534b3b0caebd699cd/infra/config/recipes.cfg
,
Apr 29 2016
,
Apr 29 2016
The following revision refers to this bug: http://goto.ext.google.com/viewvc/chrome-internal?view=rev&revision=87194 ------------------------------------------------------------------ r87194 | recipe-roller@chromium.org | 2016-04-29T00:23:14.749713Z ----------------------------------------------------------------- |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by brucedaw...@chromium.org
, Apr 2 2016