diff --git a/pbs-client/src/task_log.rs b/pbs-client/src/task_log.rs index 709d0d08..ba8c85b8 100644 --- a/pbs-client/src/task_log.rs +++ b/pbs-client/src/task_log.rs @@ -98,10 +98,12 @@ pub async fn display_task_log( let status_path = format!("api2/json/nodes/localhost/tasks/{upid_encoded}/status"); let status_result = client.get(&status_path, None).await?; - if status_result["data"]["status"].as_str() == Some("stopped") - && status_result["data"]["exitstatus"].as_str() != Some("OK") - { - bail!("task failed"); + if status_result["data"]["status"].as_str() == Some("stopped") { + if let Some(status) = status_result["data"]["exitstatus"].as_str() { + if status != "OK" && !status.starts_with("WARNINGS") { + bail!("task failed"); + } + } } Ok(())