Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

basename, sed, and tr not found while attempting pull

Todd Marek June 11, 2013

Hello,

I'm running into an issue when I try to pull using SourceTree 1.6.1 on Mac OS X Lion. I receive the following errors:

/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-sh-setup: line 77: basename: command not found

/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-sh-setup: line 77: sed: command not found

/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-sh-setup: line 222: uname: command not found

Each of the requested commandline apps are found on my system in /usr/bin (confirmed with which basename etc..).

Has anyone run across this problem, and if so how did you resolve it?

Thanks.

2 answers

1 accepted

0 votes
Answer accepted
Todd Marek June 18, 2013

Thanks for the help Steve. I have checked my .profile file and can't seem to locate anything out of the ordinary. My PATH always seems to end up including /usr/bin. I'm just using the absolute paths for now. It seems to have remedied the problem.

akshay sharma January 10, 2018

hey Marek. Pls post the answer here as well. I am also facing same issue while using intelliJ

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2013

The only way this could happen is if the PATH for Mac OS apps had been altered so that it no longer included /usr/bin. Note that the PATH that full .apps see is separate to that you see in a terminal.

The PATH is usually built up for .apps from the contents of /etc/paths and any files in /etc/paths.d. The contents of /etc/paths should be something like this on a standard install of OS X:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

I can only assume that this file has been changed so that the standard paths aren't there any more?

Todd Marek June 11, 2013

Hi Steve,

Thanks for the reply. I looked in /etc/paths and I ahve the standard:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

The only file in /etc/paths.d is titled 50-X11 and contains just the following:

/usr/X11/bin

To your knowledge, are there any other places that apps draw on in constructing their path?

I have currently modified the .sh files that were effected by the error to include the full paths to the commands so I can continue to work, but am curious what could be casuing the errors.

Thanks once again for your insight.

Todd

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 12, 2013

Hmm, no, that's the standard locations and that appears to be in order. I guess it would be worth checking your .profile just in case there's something there which is overriding the PATH, because actually the problem is not with the *direct* call that SourceTree makes, but with the nested calls that git is making, and if that has gone through /bin/sh then it would have read your ~/.profile file - so if that's overwriting your PATH then that could be a contender.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events