From 26940cde1e363a5454ef0f06381c85afdd1c85d3 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 10 Jun 2022 11:01:02 -0400 Subject: ship: Make download() sync --- src/ship.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ship.rs b/src/ship.rs index 43e660e..6466a5f 100644 --- a/src/ship.rs +++ b/src/ship.rs @@ -1,6 +1,6 @@ /*! A Ship is a star ship, or an installation ISO */ -use tokio::process::Command; +use std::process::Command; use std::process::{ExitStatus, Output}; use std::os::unix::process::ExitStatusExt; use std::str::FromStr; @@ -78,7 +78,7 @@ impl Ship { } } - pub async fn download(&self, target: &Star) -> Result<(), Error> { + pub fn download(&self, target: &Star) -> Result<(), Error> { let mut output: Output; @@ -92,8 +92,7 @@ impl Ship { &format!("/var/lib/libvirt/images/{}", self.make_pretty_name().clone()), &self.download_url.clone(), ]) - .output() - .await?; + .output()?; } else { output = Command::new("wget") .args([ @@ -101,8 +100,7 @@ impl Ship { &format!("/var/lib/libvirt/images/{}", self.make_pretty_name().clone()), &self.download_url.clone(), ]) - .output() - .await?; + .output()?; } if output.status != ExitStatus::from_raw(0) { -- cgit v1.2.3