From cc54cd6553c6d65235fdb9bbeccf6b0097eee518 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 4 Jun 2015 14:15:26 -0700 Subject: [PATCH] cmd/vet: don't use filepath.Join to build binary name in test It cleans the string and removes the initial ./, which will cause the test to fail if . is not in $PATH Change-Id: Icc216f7ab4887c39ccda93d1c4093ccd03de44bc Reviewed-on: https://go-review.googlesource.com/10696 Reviewed-by: Robert Griesemer --- cmd/vet/vet_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/vet/vet_test.go b/cmd/vet/vet_test.go index 33e54ae900..0027a1f329 100644 --- a/cmd/vet/vet_test.go +++ b/cmd/vet/vet_test.go @@ -87,7 +87,7 @@ func TestTags(t *testing.T) { "-v", // We're going to look at the files it examines. "testdata/tagtest", } - cmd = exec.Command(filepath.Join(".", binary), args...) + cmd = exec.Command("./"+binary, args...) output, err := cmd.CombinedOutput() if err != nil { t.Fatal(err)