summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-11-22 13:38:29 -0500
committerRuss Cox <rsc@golang.org>2014-11-22 13:38:29 -0500
commit8a23cf42c96d3a0c618c49fbd510215e98db3ae1 (patch)
tree6d9ae13ca2b96c464a590334eaa01567c675cbc8
parentb4ab04df9ef20c9602a5e6e47e7eceb096897f5d (diff)
downloadgo-8a23cf42c96d3a0c618c49fbd510215e98db3ae1.tar.gz
[release-branch.go1.4] cmd/go: fix running pprof on windows.
??? CL 176170043 / 61bbf19823d5 cmd/go: fix running pprof on windows. Fixes issue 9149. LGTM=alex.brainman, rsc R=rsc, dave, alex.brainman CC=golang-codereviews https://codereview.appspot.com/176170043 Committer: Russ Cox <rsc@golang.org> ??? TBR=minux CC=golang-codereviews https://codereview.appspot.com/175550043
-rw-r--r--src/cmd/go/tool.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cmd/go/tool.go b/src/cmd/go/tool.go
index c96161e0f..3f11c3e3d 100644
--- a/src/cmd/go/tool.go
+++ b/src/cmd/go/tool.go
@@ -47,7 +47,7 @@ const toolWindowsExtension = ".exe"
func tool(toolName string) string {
toolPath := filepath.Join(toolDir, toolName)
- if toolIsWindows && toolName != "pprof" {
+ if toolIsWindows {
toolPath += toolWindowsExtension
}
// Give a nice message if there is no tool with that name.
@@ -91,16 +91,6 @@ func runTool(cmd *Command, args []string) {
if toolPath == "" {
return
}
- if toolIsWindows && toolName == "pprof" {
- args = append([]string{"perl", toolPath}, args[1:]...)
- var err error
- toolPath, err = exec.LookPath("perl")
- if err != nil {
- fmt.Fprintf(os.Stderr, "go tool: perl not found\n")
- setExitStatus(3)
- return
- }
- }
if toolN {
fmt.Printf("%s %s\n", toolPath, strings.Join(args[1:], " "))
return