mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 15:45:53 +01:00
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 <ckyrouac@redhat.com>
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user