We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43337a0 commit b4bbe9cCopy full SHA for b4bbe9c
lib/src/cli.rs
@@ -612,9 +612,7 @@ fn prepare_for_write() -> Result<()> {
612
if ostree_ext::container_utils::running_in_container() {
613
anyhow::bail!("Detected container; this command requires a booted host system.");
614
}
615
- if !is_ostree_booted()? {
616
- anyhow::bail!("This command requires an ostree-booted host system");
617
- }
+ anyhow::ensure!(ostree_booted()?, "This command requires an ostree-booted host system");
618
crate::cli::require_root()?;
619
ensure_self_unshared_mount_namespace()?;
620
if crate::lsm::selinux_enabled()? && !crate::lsm::selinux_ensure_install()? {
0 commit comments