Closed oshyshko closed 10 years ago
Generally this sort of error occurs on OSX when you're launching IntelliJ via an icon on the desktop etc. with launches via the system process launcher, which doesn't include your user shell path from you're .profile
or '.bashrc` etc.
Launching Idea from the shell usually gets around this, via open /Applications/IntelliJ.app" or via the
idea` command line util.
I had similar issues when experimenting with the go-lang plugin not finding the GO_PATH
variable.
Thanks @talios. Your workaround works perfectly.
It would be good if one didn't need to do this 'work around', but at least you can.
I am still having trouble with this, even with the workaround as described. I am on OS X (10.10 Yosemite), and my ghc is in /Applications/Developer/ghc-7.8.3.app/Contents/bin . The path to this directory is in /etc/launchd.conf, and I've also exported it at the top of a shell script that then calls "open /Applications/Developer/IntelliJ\ IDEA\ 13.app" but to no avail. I have compiled and run a Java class from within the IDE that indicates that at least when running a class the right directory is in the PATH.
I can see from the code that all it's doing is using System.getenv("PATH") and creating a File with that path and with ghc + OS.getExe() which for OS X is an empty string. I've verified that ghc is at that location and that it runs.
I also have the module's SDK set with a home path of /Applications/Developer/ghc-7.8.3.app/Contents/lib/ghc-7.8.3 , which IntelliJ seems to be happy with and which results in no errors.
I can't figure out what to try next.
It appears that Apple has turned off the reading of the PATH from /etc/launchd.conf and that the setting of the PATH does not propagate through launcher commands like "open".
I made this work on Yosemite with the following shell script:
PATH=/Applications/Developer/ghc-7.8.3.app/Contents/bin::$PATH export PATH /Applications/Developer/IntelliJ\ IDEA\ 13.app/Contents/MacOS/idea
Note this doesn't call "open".
@psfblair, as you can see when you open application it is don't get normal PATH variable. So plugin tries to find ghc in /usr/local/bin. As workound you can create symlink.
@psfblair I've created issue #62 to fix this.
I see "ghc not found in PATH. It can cause issues. [OK]" message when IntelliJ starts.
The thing is that I do have ghc in path, as well as cabal, ghc-mod and ghc-modi.
To check that it's really there, I run Bash inside IntelliJ (Tools > Add new Bash console):
All commands were executed inside INtelliJ via Bash plugin (not in Terminal app)
Also, I am seeing this error message in IntelliJ log:
Any idea how to make it work?