Add the exportPuffinReports option to the runtime features route

This commit is contained in:
Kerollmops 2023-09-25 14:28:54 +02:00
parent 62dfd09dc6
commit 58db8d85ec
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
3 changed files with 26 additions and 3 deletions

View file

@ -67,6 +67,19 @@ impl RoFeatures {
.into())
}
}
pub fn check_puffin(&self) -> Result<()> {
if self.runtime.export_puffin_reports {
Ok(())
} else {
Err(FeatureNotEnabledError {
disabled_action: "Outputting Puffin reports to disk",
feature: "export puffin reports",
issue_link: "https://github.com/meilisearch/product/discussions/693",
}
.into())
}
}
}
impl FeatureData {