From 3e1b0bf370cfed307c12ae47456ed4db03e75a3b Mon Sep 17 00:00:00 2001 From: ckyrouac Date: Tue, 4 Mar 2025 13:07:25 -0500 Subject: [PATCH] reinstall: Prompt before installing podman Since podman needs to be installed at the start of the flow, let's add a prompt so the user doesn't get surprised by the podman install automatically running when simply testing the command. Signed-off-by: ckyrouac --- system-reinstall-bootc/src/podman.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-reinstall-bootc/src/podman.rs b/system-reinstall-bootc/src/podman.rs index f452cc87..af13d4bd 100644 --- a/system-reinstall-bootc/src/podman.rs +++ b/system-reinstall-bootc/src/podman.rs @@ -1,3 +1,5 @@ +use crate::prompt; + use super::ROOT_KEY_MOUNT_POINT; use anyhow::{ensure, Context, Result}; use bootc_utils::CommandRunExt; @@ -84,9 +86,7 @@ pub(crate) fn ensure_podman_installed() -> Result<()> { return Ok(()); } - tracing::warn!( - "Podman was not found on this system. It's required in order to install a bootc image. Attempting to install it automatically." - ); + prompt::ask_yes_no("Podman was not found on this system. It's required in order to install a bootc image. Do you want to install it now?", true)?; ensure!( which(podman_install_script_path()).is_ok(),