Set version to 1.3.7: wait forever for git-commands to finish in QProcess.

This commit is contained in:
2023-10-05 10:54:19 +02:00
parent 2a2751f6f3
commit 2e7d33c4c8
2 changed files with 9 additions and 4 deletions

View File

@@ -69,7 +69,10 @@ bool Command::execute(QString workingDirectory, QStringList args) {
qDebug() << "PROCESS" << m_command << "STARTED IN" << p->workingDirectory();
if (p->state() == QProcess::ProcessState::Running) {
qDebug() << "PROCESS" << m_command << "RUNNING IN" << p->workingDirectory();
if (p->waitForFinished(m_waitForFinishTimeout)) {
// wait forever fot git-commands to finish
int const wait = m_command.trimmed().startsWith("git", Qt::CaseInsensitive) ? -1 : m_waitForFinishTimeout;
bool const no_timeout = p->waitForFinished(wait);
if (no_timeout) {
qDebug() << "PROCESS" << m_command << "FINISHED IN" << p->workingDirectory();
if (p->exitStatus() == QProcess::NormalExit) {
if ((m_exitCode = p->exitCode()) == 0) {
@@ -89,8 +92,8 @@ bool Command::execute(QString workingDirectory, QStringList args) {
}
} else {
qCritical() << "PROCESS" << m_command
<< "DID NOT FINISH"
<< "IN" << p->workingDirectory();
<< "DID NOT FINISH WITH" << wait
<< "MS IN" << p->workingDirectory();
}
} else {
qCritical() << "WRONG PROCESS STATE" << p->state()