mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/pprof: exit with non-zero status code on error
Set the status code in case of error. Fixes #11510 Change-Id: If461c30a1f6d2275539f33a2eabd7b19bbfa411d Reviewed-on: https://go-review.googlesource.com/16718 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
3fb9e08758
commit
08ab43eca2
1 changed files with 1 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ func main() {
|
|||
var extraCommands map[string]*commands.Command // no added Go-specific commands
|
||||
if err := driver.PProf(flags{}, fetch.Fetcher, symbolize, new(objTool), plugin.StandardUI(), extraCommands); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
os.Exit(2)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue