Add a Windows-specific fallback to getenv("HOME");

This fixes msysGit issue 482 properly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2010-06-02 00:41:33 +02:00
committed by Pat Thoyts
parent 258862a267
commit 30cbede80a
5 changed files with 28 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ static char *make_cmd(const char *prog)
static void cd_to_homedir(void)
{
const char *home = getenv("HOME");
const char *home = get_home_directory();
if (!home)
die("could not determine user's home directory; HOME is unset");
if (chdir(home) == -1)