mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
[shellprocess] Apply current coding style
This commit is contained in:
parent
d363732302
commit
a0430f76b7
3 changed files with 57 additions and 54 deletions
|
@ -18,13 +18,13 @@
|
|||
|
||||
#include "ShellProcessJob.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDateTime>
|
||||
#include <QProcess>
|
||||
#include <QThread>
|
||||
|
||||
#include "CalamaresVersion.h"
|
||||
#include "JobQueue.h"
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
#include "utils/CommandList.h"
|
||||
#include "utils/Logger.h"
|
||||
|
@ -55,7 +55,7 @@ Calamares::JobResult
|
|||
ShellProcessJob::exec()
|
||||
{
|
||||
|
||||
if ( ! m_commands || m_commands->isEmpty() )
|
||||
if ( !m_commands || m_commands->isEmpty() )
|
||||
{
|
||||
cWarning() << "No commands to execute" << moduleInstanceKey();
|
||||
return Calamares::JobResult::ok();
|
||||
|
@ -71,16 +71,23 @@ ShellProcessJob::setConfigurationMap( const QVariantMap& configurationMap )
|
|||
bool dontChroot = CalamaresUtils::getBool( configurationMap, "dontChroot", false );
|
||||
int timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 10 );
|
||||
if ( timeout < 1 )
|
||||
{
|
||||
timeout = 10;
|
||||
}
|
||||
|
||||
if ( configurationMap.contains( "script" ) )
|
||||
{
|
||||
m_commands = new CalamaresUtils::CommandList( configurationMap.value( "script" ), !dontChroot, std::chrono::seconds( timeout ) );
|
||||
m_commands = new CalamaresUtils::CommandList(
|
||||
configurationMap.value( "script" ), !dontChroot, std::chrono::seconds( timeout ) );
|
||||
if ( m_commands->isEmpty() )
|
||||
{
|
||||
cDebug() << "ShellProcessJob: \"script\" contains no commands for" << moduleInstanceKey();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cWarning() << "No script given for ShellProcessJob" << moduleInstanceKey();
|
||||
}
|
||||
}
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( ShellProcessJobFactory, registerPlugin<ShellProcessJob>(); )
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( ShellProcessJobFactory, registerPlugin< ShellProcessJob >(); )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue