From 95ba8ac24031e0290a9916e6e6c94030a1e4b0f1 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Fri, 19 Jun 2020 16:23:55 -0700 Subject: [PATCH] cmd/protoc-gen-go: --version should exit 0 Fixes golang/protobuf#1153. Change-Id: Id2ada2353413c3371e677dcf3fdfa6fdc24a3c56 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/239339 Reviewed-by: Joe Tsai --- cmd/protoc-gen-go/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/protoc-gen-go/main.go b/cmd/protoc-gen-go/main.go index 55a58df8..a354df90 100644 --- a/cmd/protoc-gen-go/main.go +++ b/cmd/protoc-gen-go/main.go @@ -24,7 +24,7 @@ import ( func main() { if len(os.Args) == 2 && os.Args[1] == "--version" { fmt.Fprintf(os.Stderr, "%v %v\n", filepath.Base(os.Args[0]), version.String()) - os.Exit(1) + os.Exit(0) } var (