From 54a9bbb9499f64a93747c773b5ebfd82b05ccfa4 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 26 Jan 2018 18:19:35 +0100 Subject: [PATCH] [libcalamares] Don't eat output on timeout. - Copy stdout from timed-out process into the output variable, instead of just dumping it into the log file. This will improve the user experience, too, because they will get some feedback / explanation of what the process has done. --- src/libcalamares/ProcessJob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcalamares/ProcessJob.cpp b/src/libcalamares/ProcessJob.cpp index 05be969af..900f314f6 100644 --- a/src/libcalamares/ProcessJob.cpp +++ b/src/libcalamares/ProcessJob.cpp @@ -128,7 +128,8 @@ ProcessJob::callOutput( const QString& command, if ( !process.waitForFinished( timeoutSec ? ( timeoutSec * 1000 ) : -1 ) ) { cLog() << "Timed out. output so far:"; - cLog() << process.readAllStandardOutput(); + output.append( QString::fromLocal8Bit( process.readAllStandardOutput() ).trimmed() ); + cLog() << output; return -4; }