Skip to content

Commit 64a86eb

Browse files
committed
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 <[email protected]>
1 parent 1507a58 commit 64a86eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/kargs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ pub(crate) fn get_kargs_from_ostree_root(
6161
) -> Result<Vec<String>> {
6262
let kargsd = root.resolve_relative_path(KARGS_PATH);
6363
let kargsd = kargsd.downcast_ref::<ostree::RepoFile>().expect("downcast");
64+
if !kargsd.query_exists(gio::Cancellable::NONE) {
65+
return Ok(Default::default());
66+
}
6467
get_kargs_from_ostree(repo, kargsd, sys_arch)
6568
}
6669

0 commit comments

Comments
 (0)