mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
don't blow up if s9pk fails to load (#2231)
This commit is contained in:
@@ -1435,16 +1435,22 @@ pub fn load_images<'a, P: AsRef<Path> + 'a + Send + Sync>(
|
|||||||
copy_and_shutdown(&mut File::open(&path).await?, load_in)
|
copy_and_shutdown(&mut File::open(&path).await?, load_in)
|
||||||
.await?
|
.await?
|
||||||
}
|
}
|
||||||
Some("s9pk") => {
|
Some("s9pk") => match async {
|
||||||
copy_and_shutdown(
|
let mut reader = S9pkReader::open(&path, true).await?;
|
||||||
&mut S9pkReader::open(&path, false)
|
copy_and_shutdown(&mut reader.docker_images().await?, load_in)
|
||||||
.await?
|
.await?;
|
||||||
.docker_images()
|
Ok::<_, Error>(())
|
||||||
.await?,
|
|
||||||
load_in,
|
|
||||||
)
|
|
||||||
.await?
|
|
||||||
}
|
}
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
Ok(()) => (),
|
||||||
|
Err(e) => {
|
||||||
|
tracing::error!(
|
||||||
|
"Error loading docker images from s9pk: {e}"
|
||||||
|
);
|
||||||
|
tracing::debug!("{e:?}");
|
||||||
|
}
|
||||||
|
},
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user