mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[libcalamares] Simplify program-arguments creation
This commit is contained in:
parent
21f060c3fd
commit
88c75fb5dc
1 changed files with 2 additions and 4 deletions
|
@ -137,7 +137,7 @@ System::runCommand( System::RunLocation location,
|
|||
|
||||
QProcess process;
|
||||
QString program;
|
||||
QStringList arguments;
|
||||
QStringList arguments( args );
|
||||
|
||||
if ( location == System::RunLocation::RunInTarget )
|
||||
{
|
||||
|
@ -149,13 +149,11 @@ System::runCommand( System::RunLocation location,
|
|||
}
|
||||
|
||||
program = "chroot";
|
||||
arguments = QStringList( { destDir } );
|
||||
arguments << args;
|
||||
arguments.prepend( destDir );
|
||||
}
|
||||
else
|
||||
{
|
||||
program = "env";
|
||||
arguments << args;
|
||||
}
|
||||
|
||||
process.setProgram( program );
|
||||
|
|
Loading…
Add table
Reference in a new issue