Closed alecthomas closed 8 years ago
Let me know if there are any issues.
Still path issue:
env = os.environ.copy()
if self.env:
env.update(self.env)
print('gometalinter: path: {}'.format(env['PATH']))
gometalinter: path: /usr/bin:/bin:/usr/sbin:/sbin
SublimeLinter: computed PATH using /bin/bash:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/go/bin
/Applications/Postgres.app/Contents/Versions/latest/bin
/Users/ottob/go/bin
This is when I don't start from Terminal
And sorry about the tmpdir comment. I didn't realise that it was a Python function from std lib.
self.env is not set so env.update
is not run.
And I still get gometalinter: path: /usr/bin:/bin:/usr/sbin:/sbin
even if I edit my SublimeLinter config:
"paths": {
"linux": [],
"osx": [
"~/go/bin"
],
"windows": []
},
Yeah I've found the problem. I need to use lint.util.popen from SublimeLinter, which does all the env setup magic. Should be done soon.
Nice!
Okay, try that one out.
Works as expected now. Thanks!
Brilliant!
Perhaps also update the README with known issue: linting code using vendoring will not work in background mode.
@ottob this should now work with the custom SublimeLinter environment.