Skip to content

Commit ff6052d

Browse files
committed
Revert to detect exit codes
1 parent ddb0cc4 commit ff6052d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ bool Cmd::run(const QString &cmd, bool quiet, bool asRoot, bool waitForFinish)
5050
}
5151

5252
// Check for permission denied
53-
if (asRoot && getuid() != 0 && exitCode() == EXIT_CODE_PERMISSION_DENIED) {
54-
handleElevationError();
53+
if (asRoot && getuid() != 0) {
54+
if (exitCode() == EXIT_CODE_PERMISSION_DENIED || exitCode() == EXIT_CODE_COMMAND_NOT_FOUND) {
55+
handleElevationError();
56+
}
5557
}
5658

5759
emit done();

0 commit comments

Comments
 (0)