When using a terminal emulator to sudo, print the command

This commit is contained in:
baldurk
2019-10-16 15:11:20 +01:00
parent b48b3fb87e
commit 6562185e1a
+4 -3
View File
@@ -1855,9 +1855,10 @@ bool RunProcessAsAdmin(const QString &fullExecutablePath, const QStringList &par
// run terminal sudo with emulator
QStringList termParams;
termParams
<< lit("-e")
<< lit("bash -c 'sudo %1 %2'").arg(fullExecutablePath).arg(params.join(QLatin1Char(' ')));
termParams << lit("-e")
<< lit("bash -c 'echo Running \"%1 %2\" as root.;echo;sudo %1 %2'")
.arg(fullExecutablePath)
.arg(params.join(QLatin1Char(' ')));
process->start(term, termParams);