]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix running pprof on windows.
authorShenghou Ma <minux@golang.org>
Sat, 22 Nov 2014 18:37:46 +0000 (13:37 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 22 Nov 2014 18:37:46 +0000 (13:37 -0500)
Fixes #9149.

LGTM=alex.brainman, rsc
R=rsc, dave, alex.brainman
CC=golang-codereviews
https://golang.org/cl/176170043

src/cmd/go/tool.go

index c96161e0f9d523965e87f1c11dbff93e73937b4f..3f11c3e3d44a4c9cb70d56749f72570c7c4a3324 100644 (file)
@@ -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