chore: Make validation reject containers (#1970)

* chore: Make validation reject containers

* chore: Add flag for removing in non js_engine
This commit is contained in:
J M
2022-11-25 15:46:04 -07:00
committed by Aiden McClelland
parent b620e5319a
commit bd4c431eb4

View File

@@ -231,6 +231,16 @@ impl<R: AsyncRead + AsyncSeek + Unpin + Send + Sync> S9pkReader<R> {
&validated_image_ids,
)?;
#[cfg(feature = "js_engine")]
if man.containers.is_some()
|| matches!(man.main, crate::procedure::PackageProcedure::Script(_))
{
return Err(Error::new(
eyre!("Right now we don't support the containers and the long running main"),
crate::ErrorKind::ValidateS9pk,
));
}
if man.containers.is_some()
&& matches!(man.main, crate::procedure::PackageProcedure::Docker(_))
{