Open CupOfTea696 opened 9 years ago
Interesting question. I would think that the way to look up executables would be to set the PATH environment variable correspondingly and then launch Brackets when it is set as desired. In Linux for example this can be done as follows http://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux That is, the plugin should know as little as possible about the system paths as the environment in which Brackets is executed should handle it well enough. The things that the plugin should mostly deal with is how to capture some context from Brackets and pass appropriate parameters to commands. Please, let me know your further thoughts and whether the solution works for you.
I have those additional paths configured in my bash_profile
though.
I quickly checked that if a script/command is placed to /usr/local/bin then it can be executed from Brackets. I also was able to execute 'java' which is installed in a sub-directory in the home directory and is added to the PATH environment variable.
Do you have the same problem when you launch Brackets from a Bash shell instance? How do you launch Brackets?
I normally launch Brackets from my Dock or using Spotlight (I'm on OS X). Everything seems to work perfectly when I launch from Terminal.
When launched through Dock or Spotlight, I get the error "ERROR: /bin/sh: phpspec: command not found"
I normally launch Brackets from my Dock or using Spotlight (I'm on OS X). Everything seems to work perfectly when I launch from Terminal.
Unfortunately, as there is no Mac around I cannot reproduce this particular issue.
I would think that there should be a way to launch an app with passing some desirable environment variables to it in OS X.
Not sure if this helps, but maybe the environment variables should be set in /etc/launchd.conf as described here http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x
Would it be possible to add a setting to add additional bin paths to look for executables? I have a lot of things installed under
~/bin
...