feat(config): add managed settings support for enterprise deployments (#6441)

Co-authored-by: Dax <mail@thdxr.com>
This commit is contained in:
Mikhail Levchenko
2026-01-29 23:56:25 +01:00
committed by GitHub
parent 75166a1961
commit b5ffa997da
3 changed files with 172 additions and 66 deletions

View File

@@ -17,6 +17,10 @@ const testHome = path.join(dir, "home")
await fs.mkdir(testHome, { recursive: true })
process.env["OPENCODE_TEST_HOME"] = testHome
// Set test managed config directory to isolate tests from system managed settings
const testManagedConfigDir = path.join(dir, "managed")
process.env["OPENCODE_TEST_MANAGED_CONFIG_DIR"] = testManagedConfigDir
process.env["XDG_DATA_HOME"] = path.join(dir, "share")
process.env["XDG_CACHE_HOME"] = path.join(dir, "cache")
process.env["XDG_CONFIG_HOME"] = path.join(dir, "config")