vishnevskiy / ElixirSublime

Elixir plugin for SublimeText 3 providing code completion and linting.
MIT License
364 stars 25 forks source link

Doesn't get PATH properly with latest Sublime 3 #9

Open dimsmol opened 9 years ago

dimsmol commented 9 years ago

It looks like latest Sublime version doesn't run plugins with user's shell environment, so PATH doesn't contain required paths and ElixirSublime cannot find mix.

Specifying PATH in sublime settings is not a good solution because it changes if you're using kiex or something similar.

SublimeLint does some smart trick to get actual PATH from user's shell. It would be nice if ElixirSublime could do something like this to get desired PATH value.

antonmedv commented 9 years ago

ElixirSublime don't work with Sublime Test 3 too.

orendon commented 9 years ago

@dimsmol @elfet does it work correctly for you when specifying your elixir bin path on env { path } ST3 configuration?

darraghenright commented 9 years ago

I am using SL3 on OSX 10.9 with ElixirSublime, Elixir and SublimeLinter-contrib-elixirc installed. Elixir and associated executables are installed via homebrew into /usr/local/bin, which I included in my shell's $PATH.

I have no problems when I build an .ex opened via terminal because $PATH is included when you do that:

screen shot 2015-06-13 at 22 40 21

Obviously, the $PATH is not included when opening and building an .ex file via Finder and it uses a default path - with predictable results:

screen shot 2015-06-13 at 22 40 48

I tried setting the bin path in Preferences.sublime-settings as suggested in the README, but for some reason this didn't work for me - perhaps I didn't do this correctly?

FWIW, I did some googling and I found another SL package called Fix Mac Path which ensures SL3 uses your shell's $PATH. That resolved this issue for me.

https://github.com/int3h/SublimeFixMacPath

slashdotdash commented 9 years ago

@darraghenright's suggestion of using the Fix Mac Path package fixed this issue for me.