From c054668eac0ff4fe5da79cf422b1e3fc0dc94d10 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 4 Aug 2023 13:31:12 +0200 Subject: [PATCH] Ask for the reurn code of the process, not only for process exit status. --- process/command.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/process/command.cpp b/process/command.cpp index f4049a6..4b9047a 100644 --- a/process/command.cpp +++ b/process/command.cpp @@ -62,10 +62,11 @@ bool Command::execute(QString workingDirectory, QStringList args) { if (p->waitForFinished(m_waitForFinishTimeout)) { //qDebug() << "PROCESS" << m_command << "FINISHED"; if (p->exitStatus() == QProcess::NormalExit) { - //qInfo() << "EXECUTED" << m_command - // << "with code" << p->exitCode(); - // qInfo() << "RESULT" << m_commandResult; - return true; + if (p->exitCode() == 0) { + return true; + } else { + qCritical() << "EXECUTED" << m_command << "with code" << p->exitCode(); + } } else { qCritical() << "PROCESS" << m_command << "CRASHED with code" << p->exitCode();