Search code examples
gittfsgit-tf

Unable to execute git tf command


I just setup git-tf, but I'm running into an issue.

Here's the error I'm receiving:

> git tf help
line 23: exec: cmd: not found
fatal: 'tf' appears to be a git command, but we were not
able to execute it. Maybe git-tf is broken?

Here is a screenshot of the command prompt:

git-tf error

I followed the instructions for installation that appear in the included Git-TF_GettingStarted.html file, but I can't seem to get this to work. What have I done wrong?

Edit I also have cygwin installed and on my PATH. Maybe this is causing confusion for git-tf? (Removing cygwin from PATH does nothing to help)


Solution

  • This looks like a bug in the git-tf sh script on Windows, where we assume that %WINDIR% is in your path when we should be providing a full path to cmd.exe when we try to launch it.

    Until we've released a fix for this, you can do one of two things:

    1. Add %WINDIR%\system32 to your path.

    2. Edit git-tf and change line 23. Instead of simply exec'ing cmd, the appropriate line (in mingw32) should be:

      exec "$WINDIR/system32/cmd.exe" //C "$0.cmd" "$@"