Skip to content

Commit b4bbe9c

Browse files
cgwaltersomertuc
andauthored
Update lib/src/cli.rs
Co-authored-by: Omer Tuchfeld <omertuchfeld@gmail.com>
1 parent 43337a0 commit b4bbe9c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/cli.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,7 @@ fn prepare_for_write() -> Result<()> {
612612
if ostree_ext::container_utils::running_in_container() {
613613
anyhow::bail!("Detected container; this command requires a booted host system.");
614614
}
615-
if !is_ostree_booted()? {
616-
anyhow::bail!("This command requires an ostree-booted host system");
617-
}
615+
anyhow::ensure!(ostree_booted()?, "This command requires an ostree-booted host system");
618616
crate::cli::require_root()?;
619617
ensure_self_unshared_mount_namespace()?;
620618
if crate::lsm::selinux_enabled()? && !crate::lsm::selinux_ensure_install()? {

0 commit comments

Comments
 (0)