sublimetext2 - Setting environment variables for Sublime Text on OSX desktop -


i'd able access java_home variable has been set in .bash_profile within sublime text build. when build following error.

error: java_home not defined correctly. cannot execute ....

this because st2 doesn't read in bash profile. there hack around this?

thanks!

on unix child processes inherit environment of parent process. in case, sublime text not launched through process chain include bash shell in turn reading profile file.

.bash_profile executed on shell login. depending on operating system not executed when enter desktop environment. thus, environment variables not avaiable.

workarounds

  • put environment variables file read on computer boot (no idea file unless tell operating system) (e.g. lanchd.conf osx gui applications or /etc/profile on linux)

  • modify dekstop launcher icon

  • put hardcoded paths build file

  • launch sublime text using subl alias bash shell instead of desktop icon

more .bash_profile , .bashrc


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -