SublimeLinter: Path lookup failure due to slow shell startup
On my slightly older machine, and due to the inclusion of a few scripts (mainly related to virtual envs) in .bashrc, my bash doesn’t always start up that fast. However, the following code is in lint/utils.py:
try:
out, err = proc.communicate(timeout=1)
except subprocess.TimeoutExpired:
proc.kill()
out = b''
causing a PATH failure lookup with the following error:
SublimeLinter: Could not parse shell PATH output: <empty>
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 16 (9 by maintainers)
@RR2DO2 My apologies, I didn’t have access to my computer when I made my comments earlier. It turns out we’re both right. Here’s the situation:
.profile/.bash_profileis run but.bashrcis never run unless bash is invoked with-i, which never happens in an ordinary Terminal window..bashrcis run by default but.profile/.bash_profileis not unless the shell is a login shell, which by default it is not.So, for an interactive shell:
.profile/.bash_profilemust source.bashrc..bashrcmust source.profile/.bash_profile.HOWEVER!!
You still don’t want stuff relating to interactive shells running in a non-interactive shell. So:
On Mac OS X, PATH stuff should be in
.profile/.bash_profile, and source.bashrcin.profile/.bash_profileif it’s an interactive shell:On Linux, PATH stuff should be in
.profile/.bash_profile, and source that in.bashrc, which is only run when it’s a non-login shell.I hope this makes it clearer. I’ll update the documentation with this info.