Ask for the reurn code of the process, not only for process exit status.

This commit is contained in:
Gerhard Hoffmann 2023-08-04 13:31:12 +02:00
parent 82352713f1
commit c054668eac

View File

@ -62,10 +62,11 @@ bool Command::execute(QString workingDirectory, QStringList args) {
if (p->waitForFinished(m_waitForFinishTimeout)) { if (p->waitForFinished(m_waitForFinishTimeout)) {
//qDebug() << "PROCESS" << m_command << "FINISHED"; //qDebug() << "PROCESS" << m_command << "FINISHED";
if (p->exitStatus() == QProcess::NormalExit) { if (p->exitStatus() == QProcess::NormalExit) {
//qInfo() << "EXECUTED" << m_command if (p->exitCode() == 0) {
// << "with code" << p->exitCode();
// qInfo() << "RESULT" << m_commandResult;
return true; return true;
} else {
qCritical() << "EXECUTED" << m_command << "with code" << p->exitCode();
}
} else { } else {
qCritical() << "PROCESS" << m_command << "CRASHED with code" qCritical() << "PROCESS" << m_command << "CRASHED with code"
<< p->exitCode(); << p->exitCode();