changing stdErr to stdOut

This commit is contained in:
lunardunno 2024-10-27 18:18:42 +04:00 committed by GitHub
parent fbf11c1689
commit d85e4a413a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -770,11 +770,11 @@ ErrorCode ServerController::isUserInSudo(const ServerCredentials &credentials, D
if (!stdOut.contains("sudo"))
return ErrorCode::ServerUserNotInSudo;
if (stdErr.contains("command not found"))
if (stdOut.contains("command not found"))
return ErrorCode::SudoPackageIsNotPreinstalled;
if (stdErr.contains("sudoers"))
if (stdOut.contains("sudoers"))
return ErrorCode::ServerUserNotListedInSudoers;
if (stdErr.contains("password is required"))
if (stdOut.contains("password is required"))
return ErrorCode::ServerUserPasswordRequired;
return error;