Fix for recent git version where git.exe became git.cmd.

Run git as a cmd.exe subprocess as a workaround. In the long term
we should look into enabling QProcess to properly handle .bat and
.cmd files.

Reviewed-By: Ossi
This commit is contained in:
Daniel Molkentin
2009-06-02 12:21:20 +02:00
parent 6c85e5ec31
commit 64e925d2be

View File

@@ -132,7 +132,9 @@ void GitCommand::run()
if (Git::Constants::debug)
qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments;
process.start(m_binaryPath, m_jobs.at(j).arguments);
QStringList args;
args << "/c" << m_binaryPath << m_jobs.at(j).arguments;
process.start("cmd.exe", args);
if(!process.waitForStarted()) {
ok = false;
error += QString::fromLatin1("Error: \"%1\" could not be started: %2").arg(m_binaryPath, process.errorString());