Sync with 1.7.0.6
[gitweb.git] / run-command.c
index c8d53795ec3ae9b8b0a73b3d6900c1a1f212d2c2..eb5c57562909c1e505c2a7688bad6dbeea4b96a0 100644 (file)
@@ -342,8 +342,6 @@ int start_command(struct child_process *cmd)
        else if (cmd->out > 1)
                fhout = dup(cmd->out);
 
-       if (cmd->dir)
-               die("chdir in start_command() not implemented");
        if (cmd->env)
                env = make_augmented_environ(cmd->env);
 
@@ -353,7 +351,7 @@ int start_command(struct child_process *cmd)
                cmd->argv = prepare_shell_cmd(cmd->argv);
        }
 
-       cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env,
+       cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,
                                  fhin, fhout, fherr);
        failed_errno = errno;
        if (cmd->pid < 0 && (!cmd->silent_exec_failure || errno != ENOENT))