cmd/vet: fix bug where incorrect exit code was returned
Fixes golang/go#8792. This is a simple change that fixes the issue. It may be desireable to opt for a larger code change that makes this problem less likely to be inadvertedly reintroduced in the future. For instance, a vetMain() func can be used similar to gofmtMain(), or the os.Exit call can be deferred. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/150850043
This commit is contained in:
parent
59d8afa26b
commit
cccd43354a
|
|
@ -245,7 +245,7 @@ func main() {
|
|||
for _, name := range flag.Args() {
|
||||
walkDir(name)
|
||||
}
|
||||
return
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
if !doPackage(".", flag.Args()) {
|
||||
warnf("no files checked")
|
||||
|
|
|
|||
Loading…
Reference in New Issue