|
|
@ -142,11 +142,11 @@ func main() { |
|
|
|
// in the middle of directory elements, such as /tmp/git-1.8.2~rc3
|
|
|
|
// in the middle of directory elements, such as /tmp/git-1.8.2~rc3
|
|
|
|
// or C:\PROGRA~1. Only ~ as a path prefix has meaning to the shell.
|
|
|
|
// or C:\PROGRA~1. Only ~ as a path prefix has meaning to the shell.
|
|
|
|
if strings.HasPrefix(p, "~") { |
|
|
|
if strings.HasPrefix(p, "~") { |
|
|
|
fmt.Fprintf(os.Stderr, "go: GOPATH entry cannot start with shell metacharacter '~': %q\n", p) |
|
|
|
fmt.Fprintf(os.Stderr, "gpm: GOPATH entry cannot start with shell metacharacter '~': %q\n", p) |
|
|
|
os.Exit(2) |
|
|
|
os.Exit(2) |
|
|
|
} |
|
|
|
} |
|
|
|
if build.IsLocalImport(p) { |
|
|
|
if build.IsLocalImport(p) { |
|
|
|
fmt.Fprintf(os.Stderr, "go: GOPATH entry is relative; must be absolute path: %q.\nRun 'go help gopath' for usage.\n", p) |
|
|
|
fmt.Fprintf(os.Stderr, "gpm: GOPATH entry is relative; must be absolute path: %q.\nRun 'gpm help gopath' for usage.\n", p) |
|
|
|
os.Exit(2) |
|
|
|
os.Exit(2) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -167,13 +167,13 @@ func main() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fmt.Fprintf(os.Stderr, "go: unknown subcommand %q\nRun 'go help' for usage.\n", args[0]) |
|
|
|
fmt.Fprintf(os.Stderr, "gpm: unknown subcommand %q\nRun 'gpm help' for usage.\n", args[0]) |
|
|
|
setExitStatus(2) |
|
|
|
setExitStatus(2) |
|
|
|
exit() |
|
|
|
exit() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var usageTemplate string |
|
|
|
var usageTemplate string |
|
|
|
var helpTemplate = `{{if .Runnable}}usage: go {{.UsageLine}} |
|
|
|
var helpTemplate = `{{if .Runnable}}usage: gpm {{.UsageLine}} |
|
|
|
|
|
|
|
|
|
|
|
{{end}}{{.Long | trim}} |
|
|
|
{{end}}{{.Long | trim}} |
|
|
|
` |
|
|
|
` |
|
|
|