Possible Duplicate:
How do I set PATH and other environment variables?

I recently installed git 1.7.4.4 via the installer from here http://code.google.com/p/git-osx-installer/ (not via homebrew or stuff...) and found that it added itself to my $PATH.

I wonder, where did it do that? I checked my ~/.bashrc and also /etc/bashrc and /etc/profile, nowhere is a line like PATH=$PATH:/usr/local/git/bin

Out of curiosity, where did the git-installer put the change to the path??

link|improve this question
1  
Related (with good section on Mac OS X, that already contains both answers from OS). – Daniel Beck Jun 12 '11 at 12:41
I don't know about OSX, but on linux, your bash profile generally sources /etc/profile, which then sources /etc/profile.d/*.sh. – Jefromi Jun 12 '11 at 15:49
feedback

migrated from stackoverflow.com Jun 12 '11 at 12:38

This question came from our site for professional and enthusiast programmers.

closed as exact duplicate by Daniel Beck, slhck, studiohack Jun 13 '11 at 0:20

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

Have a look in /etc/paths.d/. If there is a file called git, this is how your $PATH is manipulated.

Since Leopard, there is an alternative method for manipulating the PATH by adding text files to /etc/paths.d/ containing lines that will be appended to the PATH variable. Kind of simple, but it does cause issues if you aren't aware of it.

EDIT: There is also a corresponding /etc/manpaths.d/

link|improve this answer
feedback

Perhaps it's located in /etc/paths??

cat /etc/paths
link|improve this answer
feedback