feat(core) SandboxPolicy::Custom

This commit is contained in:
Dylan Hurd
2026-02-22 09:47:32 -08:00
parent e7b6f38b58
commit 3d619f32b7
16 changed files with 408 additions and 80 deletions

View File

@@ -451,6 +451,13 @@ impl TryFrom<ConfigRequirementsWithSources> for ConfigRequirements {
SandboxPolicy::ExternalSandbox { .. } => {
SandboxModeRequirement::ExternalSandbox
}
SandboxPolicy::Custom { writable_roots, .. } => {
if writable_roots.is_empty() {
SandboxModeRequirement::ReadOnly
} else {
SandboxModeRequirement::WorkspaceWrite
}
}
};
if modes.contains(&mode) {
Ok(())