1
0
mirror of https://github.com/golang/go synced 2024-11-05 15:46:11 -07:00
go/cmd/go-contrib-init
Tim Heckman 807424b52b cmd/go-contrib-init: exit with an error if package install fails
During the first run of `go-contrib-init` it tries to install the
golang.org/x/review/git-codereview package using `go get`. If this command were
to fail, we would check for the error and log that the command failed to
succeed. However, when failure occurred we would only log the error and not
interrupt the flow of the program. This would cause the program to continue with
the assumption that git-codereview had been installed correctly.

This change enhances the `go-contrib-init` command to exit with a bad status
code, after logging the failure, if installing git-codereview fails.

Fixes golang/go#21040

Change-Id: Ie01d78557d54285001db61faafbb409888b2893c
Reviewed-on: https://go-review.googlesource.com/49151
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-17 03:20:55 +00:00
..
contrib_test.go tools: handle paths like ~/ or $HOME/. 2017-06-22 02:08:34 +00:00
contrib.go cmd/go-contrib-init: exit with an error if package install fails 2017-07-17 03:20:55 +00:00