mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kdesudo: fix execution failure detection and notification
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5bca600df3
commit
bf041a724f
1 changed files with 4 additions and 3 deletions
|
@ -304,8 +304,9 @@ void KdeSudo::parseOutput()
|
|||
} else {
|
||||
error(i18n("Wrong password! Exiting..."));
|
||||
}
|
||||
|
||||
} else if (strOut.contains("command not found")) {
|
||||
// NOTE: "command not found" comes from `sudo` while "No such file or directory" comes from
|
||||
// either `nice` or `dbus-run-session`
|
||||
} else if (strOut.contains("command not found") || strOut.contains("No such file or directory")) {
|
||||
error(i18n("Command not found!"));
|
||||
} else if (strOut.contains("is not in the sudoers file")) {
|
||||
error(i18n("Your username is unknown to sudo!"));
|
||||
|
@ -330,8 +331,8 @@ void KdeSudo::procExited(int exitCode)
|
|||
if (!m_tmpName.isEmpty()) {
|
||||
QFile::remove(m_tmpName);
|
||||
}
|
||||
KApplication::kApplication()->exit(exitCode);
|
||||
}
|
||||
KApplication::kApplication()->exit(exitCode);
|
||||
}
|
||||
|
||||
void KdeSudo::pushPassword(const QString &pwd)
|
||||
|
|
Loading…
Add table
Reference in a new issue