From 7351217489d708cccec2e52b6b061d1501e4aa8c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 20 Oct 2015 15:29:33 +0200 Subject: [PATCH] Relative GOBIN not allowed in Go 1.5.2+ --- build.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.go b/build.go index 9f8041072..54d22b6fb 100644 --- a/build.go +++ b/build.go @@ -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, ","))