DescriptionFix `git cl format` for dart code.
The part that runs dartfmt was relying on the part that runs (or not)
Clang to set the |env| local variable, which no longer happens after
https://codereview.chromium.org/1734863002, making `git cl format` fail
with:
Traceback (most recent call last):
File "/usr/local/google/home/ppi/projects/depot_tools/git_cl.py", line 3957, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/google/home/ppi/projects/depot_tools/git_cl.py", line 3939, in main
return dispatcher.execute(OptionParser(), argv)
File "/usr/local/work/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/usr/local/google/home/ppi/projects/depot_tools/git_cl.py", line 3837, in CMDformat
stdout = RunCommand(command, cwd=top_dir, env=env)
UnboundLocalError: local variable 'env' referenced before assignment
It seems that we don't need to override env for dartfm anyway - the
clang part is doing this to put clang_format_tool in PATH.
This patch just drops env= from RunCommand for dartfmt.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299072
Patch Set 1 #Messages
Total messages: 8 (4 generated)
|