TeamCity didn't load my .bash_profile when use launchctl on Mac OS X

Hi there,

I am using TeamCity 7 on a Mac OS X 10.7.4
I configured two launchctl tasks (one for Server and one for agent) to run teamcity at login.

But it turns out it obviously didn't load my /User/username/.bash_profile, because I saw many env values are not right. Like PATH, and JAVA_HOME

Could you please help?

Thanks in advance,

Comment actions Permalink

Look at this PATH:

env.PATH /usr/bin:/bin:/usr/sbin:/sbin

It should be much ore than this!
And why this JAVA_HOME is pointing to 1.4?
env.JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.4/Home

And when I want to run an agent with command line configuration of a build. It complains there is no env.TEAMCITY_GIT_PATH, but actually I have git and it was installed by homebrew, it can be eaily found and use when the .bash_profile is loading correctly.

Comment actions Permalink


  launchctl doesn't start bash and doesn't load .bash_profile, AFAIK.

  The possible solution to your question is described here:

  Hope this helps,


Please sign in to leave a comment.