From e6e1324353b3fd3dbaef59a4937852f5bf820b0b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 Aug 2017 16:44:09 -0400 Subject: [PATCH] Log process output of failed commands FIXES #612 --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index 176771e36..c38d398e6 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -195,8 +195,14 @@ System::targetEnvOutput( const QStringList& args, return -1; } - cLog() << "Finished. Exit code:" << process.exitCode(); - return process.exitCode(); + auto r = process.exitCode(); + cLog() << "Finished. Exit code:" << r; + if ( r != 0 ) + { + cLog() << "Target cmd" << args; + cLog() << "Target out" << output; + } + return r; }