[shellprocess] Make explicit that an error code has been ignored, by logging it.

This commit is contained in:
Adriaan de Groot 2018-01-15 05:26:20 -05:00
parent e48767eaa6
commit 8571fd800e

View File

@ -99,9 +99,12 @@ ShellProcessJob::exec()
CalamaresUtils::ProcessResult r = System::runCommand(
location, shell_cmd, QString(), QString(), 10 );
if ( ( r.getExitCode() != 0 ) && !suppress_result )
if ( r.getExitCode() != 0 )
{
return Calamares::JobResult::error( tr( "Could not run command." ), r.getOutput() );
if ( suppress_result )
cDebug() << "Error code" << r.getExitCode() << "ignored by ShellProcess configuration.";
else
return Calamares::JobResult::error( tr( "Could not run command." ), r.getOutput() );
}
}