agreety: Post None answer on Info/Error
This commit is contained in:
@@ -73,22 +73,20 @@ fn login(node: &str, cmd: &mut Option<String>) -> Result<LoginResult, Box<dyn st
|
|||||||
auth_message,
|
auth_message,
|
||||||
auth_message_type,
|
auth_message_type,
|
||||||
} => {
|
} => {
|
||||||
let answer = match auth_message_type {
|
let response = match auth_message_type {
|
||||||
AuthMessageType::Visible => prompt_stderr(&auth_message)?,
|
AuthMessageType::Visible => Some(prompt_stderr(&auth_message)?),
|
||||||
AuthMessageType::Secret => prompt_password_stderr(&auth_message)?,
|
AuthMessageType::Secret => Some(prompt_password_stderr(&auth_message)?),
|
||||||
AuthMessageType::Info => {
|
AuthMessageType::Info => {
|
||||||
eprintln!("info: {}", auth_message);
|
eprintln!("info: {}", auth_message);
|
||||||
"".to_string()
|
None
|
||||||
}
|
}
|
||||||
AuthMessageType::Error => {
|
AuthMessageType::Error => {
|
||||||
eprintln!("error: {}", auth_message);
|
eprintln!("error: {}", auth_message);
|
||||||
"".to_string()
|
None
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
next_request = Request::PostAuthMessageResponse {
|
next_request = Request::PostAuthMessageResponse { response };
|
||||||
response: Some(answer),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
Response::Success => {
|
Response::Success => {
|
||||||
if starting {
|
if starting {
|
||||||
|
Reference in New Issue
Block a user