feat: fix error message
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
d1e9eb9eb5
commit
32cd1cc617
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user