diff --git a/crates/churn/src/agent/refresh.rs b/crates/churn/src/agent/refresh.rs index 215b5bf..3de97cc 100644 --- a/crates/churn/src/agent/refresh.rs +++ b/crates/churn/src/agent/refresh.rs @@ -1,3 +1,5 @@ +use anyhow::Context; + use super::agent_state::AgentState; #[derive(Clone)] @@ -89,7 +91,7 @@ impl Task { pub async fn execute(&self) -> anyhow::Result<()> { let mut cmd = tokio::process::Command::new("apt"); cmd.args(["apt-get", "update", "-q"]); - let output = cmd.output().await?; + let output = cmd.output().await.context("failed to run apt update")?; match output.status.success() { true => tracing::info!("successfully ran apt update"), false => { @@ -103,7 +105,7 @@ impl Task { let mut cmd = tokio::process::Command::new("apt"); cmd.env("DEBIAN_FRONTEND", "noninteractive") .args(["apt-get", "upgrade", "-y"]); - let output = cmd.output().await?; + let output = cmd.output().await.context("failed to run apt upgrade")?; match output.status.success() { true => tracing::info!("successfully ran apt upgrade"), false => {