DisposaBoy/GoSublime — Issue #37: Env vars not working
Author: tcard
Created: 2012-02-27 03:12:18+00:00
State: open

I'm working with latest weekly release of Go, which needs the GOPATH var set to correctly find package paths and such. I put that var on my config file:

"env": {
"PATH": "/usr/local/go/bin:$PATH",
"GOPATH": "/Users/harad/golang"
},

But the gotype command when is called by GsLint shows errors just like if the GOPATH var were not defined.

On the shell, where GOPATH is the same, gotype works fine, throwing no errors:

Horchata:~ harad$ echo $GOPATH
/Users/harad/golang
Horchata:~ harad$ go tool gotype golang/src/clienet/main.go
Horchata:~ harad$

But when I unset GOPATH, I get some errors, just the same errors that show up on GsLint for that file:

Horchata:~ harad$ GOPATH=
Horchata:~ harad$ go tool gotype golang/src/clienet/main.go
golang/src/clienet/main.go:3:8: could not import clienet/services/prueba (can't find import: clienet/services/prueba)
golang/src/clienet/main.go:6:2: undeclared name: prueba
go tool gotype: exit status 2
Horchata:~ harad$

So the `env` property in the config file doesn't seem to take effect.

ST2 Build 2181, GoSublime v2012.02.26.12.18.51, Mac OS X.