Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git difftool problem: unable to create temp-file

Tags:

git

difftool

I'm using git with Kaleidoscope configured as the difftool. It's been working fine for months. It was working a day or two ago as well. Today, when I tried doing a "git difftool", suddenly, git reports

fatal: unable to create temp-file: No such file or directory

Searching around on google suggested that this might be a directory permission problem in the local git repo. But the situation did not improve even after a recursive chown on the git repo.

Git-difftool documentation does not mention where it might be trying to create this temp file. Does anybody have any ideas on how to find this out?

like image 269
odie Avatar asked Aug 08 '11 06:08

odie


1 Answers

As I commented, this kind of message depends usually on the value of the environment variable $TMPDIR.

In the OP's case:

$TMPDIR was set to something crazy "/private/tmp/PKInstallSandbox.W1I4ev/tmp".
After a bit of googling, this is apparently an known issue with an installer of an app (TotalTerminal).
It did a self update today, but I didn't figure it would actually break something.

Restoring $TMPDIR to a "sane" value (like /tmp or other MacOs-specific localtion) should fix the issue.

like image 99
VonC Avatar answered Oct 23 '22 20:10

VonC