commit | c17ffddf23280693c932c2c535bca4baff5cfb84 | [log] [tgz] |
---|---|---|
author | Anthony Fandrianto <atyfto@google.com> | Mon Jun 22 05:35:36 2020 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Mon Jun 22 05:35:36 2020 +0000 |
tree | 522f266f4315c870843ada5957c4a8748e2060cb | |
parent | 47c9234b41f87f0d17f86501483c0a2ed7b82bde [diff] |
[cl-util] Fix typo when setting JSON output We were not setting the `out` in the surrounding context, which meant we were unconditionally outputting JSON to stdout even if a filepath was specified. Change-Id: I83af231961571a9fdad190140a62c97426d8921d Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/infra/+/401082 Reviewed-by: Oliver Newman <olivernewman@google.com> Commit-Queue: Anthony Fandrianto <atyfto@google.com>
diff --git a/cmd/cl-util/create_cl.go b/cmd/cl-util/create_cl.go index 572fc8a..d289dbe 100644 --- a/cmd/cl-util/create_cl.go +++ b/cmd/cl-util/create_cl.go
@@ -135,7 +135,7 @@ } out := os.Stdout if c.jsonOutput != "-" { - out, err := os.Create(c.jsonOutput) + out, err = os.Create(c.jsonOutput) if err != nil { return err }