require script is present during pack step iff any pkg procs are type script

This commit is contained in:
Keagan McClelland
2022-05-17 16:46:10 -06:00
parent c8fc9a98bf
commit 6801ff996e
3 changed files with 36 additions and 3 deletions

View File

@@ -77,6 +77,12 @@ pub enum PackageProcedure {
Script(JsProcedure),
}
impl PackageProcedure {
pub fn is_script(&self) -> bool {
match self {
Self::Js(_) => true,
_ => false,
}
}
#[instrument]
pub fn validate(
&self,