From bd4c431eb47bf428b9f329f8f06eaca1c2fe580c Mon Sep 17 00:00:00 2001 From: J M <2364004+Blu-J@users.noreply.github.com> Date: Fri, 25 Nov 2022 15:46:04 -0700 Subject: [PATCH] chore: Make validation reject containers (#1970) * chore: Make validation reject containers * chore: Add flag for removing in non js_engine --- backend/src/s9pk/reader.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/s9pk/reader.rs b/backend/src/s9pk/reader.rs index eefc4ae63..fe6bb7b42 100644 --- a/backend/src/s9pk/reader.rs +++ b/backend/src/s9pk/reader.rs @@ -231,6 +231,16 @@ impl S9pkReader { &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(_)) {