1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:54:40 -07:00

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 <gri@golang.org>
This commit is contained in:
Rob Pike 2015-06-04 14:15:26 -07:00
parent 3caa6cfbd2
commit cc54cd6553

View File

@ -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)