mirror of
https://github.com/openai/codex.git
synced 2026-05-05 13:51:29 +03:00
feat(core) SandboxPolicy::Custom
This commit is contained in:
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user