From e0b1e2347f720f00d61be8e39b58781d975064fd Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 25 Jan 2024 11:25:46 -0500 Subject: [PATCH] first_boot: Add context for genisoimage I got a bare ``` Error: crun-vm: failed to load cloud-init config: No such file or directory (os error 2): OCI runtime attempted to invoke a command that was not found ``` Because my host was missing `genisoimage`. This turns that into ``` Error: crun-vm: failed to load cloud-init config: Invoking genisoimage: No such file or directory (os error 2): OCI runtime attempted to invoke a command that was not found ``` which is a bit more useful. Signed-off-by: Colin Walters --- src/commands/create/first_boot.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/create/first_boot.rs b/src/commands/create/first_boot.rs index fb6b23a..0bc6f64 100644 --- a/src/commands/create/first_boot.rs +++ b/src/commands/create/first_boot.rs @@ -208,8 +208,9 @@ impl FirstBootConfig<'_> { .arg(out_config_dir_path.as_ref().join("meta-data")) .arg(out_config_dir_path.as_ref().join("user-data")) .arg(out_config_dir_path.as_ref().join("vendor-data")) - .spawn()? - .wait()?; + .spawn() + .and_then(|mut child| child.wait()) + .context("Invoking genisoimage")?; ensure!(status.success(), "genisoimage failed");