diff --git a/appmgr/src/properties.rs b/appmgr/src/properties.rs index da48633ae..cc1994a46 100644 --- a/appmgr/src/properties.rs +++ b/appmgr/src/properties.rs @@ -29,18 +29,21 @@ pub async fn fetch_properties(ctx: RpcContext, id: PackageId) -> Result( - &ctx, - &manifest.id, - &manifest.version, - None, - &manifest.volumes, - None, - false, - ) - .await? - .map_err(|_| Error::new(anyhow!("Properties failure!"), crate::ErrorKind::Docker)) - .and_then(|a| Ok(a)) + if let Some(props) = manifest.properties { + props + .execute::<(), Value>( + &ctx, + &manifest.id, + &manifest.version, + None, + &manifest.volumes, + None, + false, + ) + .await? + .map_err(|_| Error::new(anyhow!("Properties failure!"), crate::ErrorKind::Docker)) + .and_then(|a| Ok(a)) + } else { + Ok(Value::Null) + } } diff --git a/appmgr/src/s9pk/manifest.rs b/appmgr/src/s9pk/manifest.rs index 4f0ace292..d30c101cf 100644 --- a/appmgr/src/s9pk/manifest.rs +++ b/appmgr/src/s9pk/manifest.rs @@ -118,7 +118,7 @@ pub struct Manifest { #[model] pub config: Option, #[model] - pub properties: ActionImplementation, + pub properties: Option, #[model] pub volumes: Volumes, // #[serde(default = "current_version")]