support OPENCODE_PERMISSION json env variable

This commit is contained in:
Dax Raad
2025-08-12 12:28:08 -04:00
parent 354e55ecef
commit 5a17f44da4
2 changed files with 5 additions and 0 deletions

View File

@@ -110,6 +110,10 @@ export namespace Config {
].map((x) => "file://" + x),
)
if (Flag.OPENCODE_PERMISSION) {
result.permission = mergeDeep(result.permission ?? {}, JSON.parse(Flag.OPENCODE_PERMISSION))
}
// Handle migration from autoshare to share field
if (result.autoshare === true && !result.share) {
result.share = "auto"