Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Issue 1760873002: Fix `git cl format` for dart code. (Closed)

Created:
4 years, 9 months ago by ppi
Modified:
4 years, 9 months ago
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix `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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M git_cl.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
ppi
Hi Aaron, Paweł, ptal.
4 years, 9 months ago (2016-03-03 11:17:07 UTC) #3
Paweł Hajdan Jr.
LGTM
4 years, 9 months ago (2016-03-03 15:29:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1760873002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1760873002/1
4 years, 9 months ago (2016-03-03 15:38:16 UTC) #6
commit-bot: I haz the power
4 years, 9 months ago (2016-03-03 15:41:19 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
http://src.chromium.org/viewvc/chrome?view=rev&revision=299072

Powered by Google App Engine
This is Rietveld 408576698