Relative GOBIN not allowed in Go 1.5.2+

This commit is contained in:
Jakob Borg 2015-10-20 15:29:33 +02:00
parent aa42aafe33
commit 7351217489

View File

@ -195,7 +195,11 @@ func bench(pkg string) {
}
func install(pkg string, tags []string) {
os.Setenv("GOBIN", "./bin")
cwd, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
os.Setenv("GOBIN", filepath.Join(cwd, "bin"))
args := []string{"install", "-v", "-ldflags", ldflags()}
if len(tags) > 0 {
args = append(args, "-tags", strings.Join(tags, ","))