Skip to content

Commit 0edc194

Browse files
committed
fix error handling for activation timeout
See #287
1 parent ca2f74d commit 0edc194

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/deploy.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ pub enum DeployProfileError {
332332
SSHActivate(std::io::Error),
333333
#[error("Activating over SSH resulted in a bad exit code: {0:?}")]
334334
SSHActivateExit(Option<i32>),
335+
#[error("Activating over SSH resulted in a bad exit code: {0:?}")]
336+
SSHActivateTimeout(tokio::sync::oneshot::error::RecvError),
335337

336338
#[error("Failed to run wait command over SSH: {0}")]
337339
SSHWait(std::io::Error),
@@ -520,7 +522,7 @@ pub async fn deploy_profile(
520522
info!("Success activating, attempting to confirm activation");
521523

522524
let c = confirm_profile(deploy_data, deploy_defs, temp_path, &ssh_addr).await;
523-
recv_activated.await.unwrap();
525+
recv_activated.await.map_err(|x| DeployProfileError::SSHActivateTimeout(x))?;
524526
c?;
525527

526528
thread

0 commit comments

Comments
 (0)