From 1bfae45b0781fcc54863688f781dc484353e3b42 Mon Sep 17 00:00:00 2001 From: Vorn Mom Date: Sun, 24 Jan 2016 12:11:27 -0500 Subject: [PATCH] terminal/command: Fixed 'test' command on Windows This change addresses a Windows-specifc issue with the 'test' command. On Windows, 'go test' generate executables with a '.exe' filename extention, but the current implementation attaches to a filename without the extention. --- cmd/dlv/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/dlv/main.go b/cmd/dlv/main.go index 0877cbaf..945ce92c 100644 --- a/cmd/dlv/main.go +++ b/cmd/dlv/main.go @@ -256,6 +256,10 @@ starts and attaches to it, and enable you to immediately begin debugging your pr return 1 } debugname := "./" + base + ".test" + // On Windows, "go test" generates an executable with the ".exe" extension + if runtime.GOOS == "windows" { + debugname += ".exe" + } defer os.Remove(debugname) processArgs := append([]string{debugname}, args...) -- GitLab