From 47fac31223817d8f3c4bac6fa0bb7dc0e590f14f Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 10 Oct 2023 16:03:52 +0200 Subject: [PATCH] remove timeout for process runtime for opkg-commands --- process/command.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/process/command.cpp b/process/command.cpp index e57532b..574e2d5 100644 --- a/process/command.cpp +++ b/process/command.cpp @@ -69,8 +69,12 @@ 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(); - // wait forever fot git-commands to finish - int const wait = m_command.trimmed().startsWith("git", Qt::CaseInsensitive) ? -1 : m_waitForFinishTimeout; + // wait forever for git/opkg-commands to finish + int wait = m_waitForFinishTimeout; + if (m_command.trimmed().startsWith("git", Qt::CaseInsensitive) || + m_command.trimmed().startsWith("opkg", Qt::CaseInsensitive)) { + wait = -1; + } bool const no_timeout = p->waitForFinished(wait); if (no_timeout) { qDebug() << "PROCESS" << m_command << "FINISHED IN" << p->workingDirectory();