basename, sed, and tr not found while attempting pull

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

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.

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

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?

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

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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

696 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot