cmd/go: return status 2 on 'go mod'

This commit is contained in:
as 2018-08-01 11:37:46 -07:00
parent 2f67fcf75e
commit 9989b74c12

View file

@ -193,7 +193,8 @@ BigCmdLoop:
args = args[1:]
if len(args) == 0 {
help.PrintUsage(os.Stderr, bigCmd)
return
base.SetExitStatus(2)
base.Exit()
}
if args[0] == "help" {
// Accept 'go mod help' and 'go mod help foo' for 'go help mod' and 'go help mod foo'.