diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index c464e93f6..9e3cad4f9 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -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 );