View Full Version : Env variables being written to user profiles

02-21-2008, 11:36 AM
Whenever I set an environment variable in my installer it is written into the .profile of the user for Linux. For MacOSX, however, the variable is always written to .bash_profile regardless of whether that file already exists. The problem is that with bash, only ONE of the following files is loaded, in this order:
~/.bash_profile, ~/.bash_login, or ~/.profile.

So, if the user has already configured .profile or .bash_login, they are overridden by the newly created .bash_profile which did not exist before. As a consequence, they lose their existing bash environment setup. I would expect the installer to add the env variable to an existing profile, or to let the IA developer specify how to set it.

Is there a way for the IA developer to better control how env variables are set into the profile?