summaryrefslogtreecommitdiff
path: root/src/install.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/install.rs')
-rw-r--r--src/install.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/install.rs b/src/install.rs
index dce0fea..e74e6ba 100644
--- a/src/install.rs
+++ b/src/install.rs
@@ -17,9 +17,9 @@ pub enum VirtInstallError {
#[error("virt-install failed: {0}")]
VirtInstallFailed(String),
- /// I/O error.
- #[error(transparent)]
- IoError(#[from] std::io::Error),
+ /// Failed to run virt-install.
+ #[error("couldn't run virt-install")]
+ Run(#[source] std::io::Error),
/// Error parsing a string as UTF8.
#[error(transparent)]
@@ -115,7 +115,8 @@ pub fn virt_install(args: &VirtInstallArgs, iso: &Path) -> Result<PathBuf, VirtI
.arg("--graphics=spice")
.arg("--noautoconsole")
.arg("--quiet")
- .output()?;
+ .output()
+ .map_err(|err| VirtInstallError::Run(err))?;
if !r.status.success() {
let stderr = String::from_utf8(r.stderr)?;
return Err(VirtInstallError::VirtInstallFailed(stderr));