Permalink
Browse files

build even with GOPATH unset

  • Loading branch information...
adg committed Apr 24, 2012
1 parent 3e8c717 commit 32218f4e5e7a8d8c5eb9ac9a46f5da170e7ed559
Showing with 5 additions and 4 deletions.
  1. +5 −4 battc/battc.go
View
@@ -235,13 +235,14 @@ func env(gopath string) []string {
for i := len(s) - 1; i >= 0; i-- {
switch {
case strings.HasPrefix(s[i], "GOPATH="):
- s[i] = "GOPATH=" + gopath
case strings.HasPrefix(s[i], "GOBIN="):
- s[i] = s[len(s)-1]
- s = s[:len(s)-1]
+ default:
+ continue
}
+ s[i] = s[len(s)-1]
+ s = s[:len(s)-1]
}
- return s
+ return append(s, "GOPATH="+gopath)
}
func cpToTempFile(filename, tmpfilename string) (tmpfile string, err error) {

0 comments on commit 32218f4

Please sign in to comment.