commit | 92303e1c7b957afdbe62ffdb0fadb4847fc9901e | [log] [tgz] |
---|---|---|
author | Matt Rosencrantz <mattr@google.com> | Wed Jan 21 09:02:42 2015 -0800 |
committer | Matt Rosencrantz <mattr@google.com> | Wed Jan 21 09:03:25 2015 -0800 |
tree | b261343a9e4484f7c0a60e1fdd67e12977b6b24e | |
parent | 9b932af9eb5986cb7583f17d3b620442699a39c7 [diff] [blame] |
core: Make cmdline.Command.Main return an exit code instead of exiting. Change-Id: Ife34378019ee25cc4d6809f1b3923a8e4f234572 MultiPart: 1/3Change-Id: Idf9bab4a66f7da4b06a12943c746b05082d69f60
diff --git a/tools/vrpc/vrpc.go b/tools/vrpc/vrpc.go index 5c025d3..66d7b05 100644 --- a/tools/vrpc/vrpc.go +++ b/tools/vrpc/vrpc.go
@@ -6,6 +6,7 @@ import ( "fmt" "io" + "os" "strings" "time" @@ -31,8 +32,9 @@ if err != nil { panic(err) } - defer runtime.Cleanup() - cmdVRPC.Main() + exitCode := cmdVRPC.Main() + runtime.Cleanup() + os.Exit(exitCode) } var cmdVRPC = &cmdline.Command{