From 64a86eb3e5e7cdb1216611cdaa96c2b2ce4888fd Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 8 Nov 2024 17:15:22 -0500 Subject: [PATCH] kargs: Handle when kargs.d doesn't exist I'm experimenting with custom base images and hit on this not existing. Signed-off-by: Colin Walters --- lib/src/kargs.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/kargs.rs b/lib/src/kargs.rs index dccd27a27..af4410e8b 100644 --- a/lib/src/kargs.rs +++ b/lib/src/kargs.rs @@ -61,6 +61,9 @@ pub(crate) fn get_kargs_from_ostree_root( ) -> Result> { let kargsd = root.resolve_relative_path(KARGS_PATH); let kargsd = kargsd.downcast_ref::().expect("downcast"); + if !kargsd.query_exists(gio::Cancellable::NONE) { + return Ok(Default::default()); + } get_kargs_from_ostree(repo, kargsd, sys_arch) }