support OPENCODE_CONFIG_CONTENT

This commit is contained in:
Dax Raad
2025-09-02 15:15:34 -04:00
parent d6350a7fa6
commit 8952b3d246
3 changed files with 22 additions and 10 deletions

View File

@@ -34,6 +34,11 @@ export namespace Config {
log.debug("loaded custom config", { path: Flag.OPENCODE_CONFIG })
}
if (Flag.OPENCODE_CONFIG_CONTENT) {
result = mergeDeep(result, JSON.parse(Flag.OPENCODE_CONFIG_CONTENT))
log.debug("loaded custom config from OPENCODE_CONFIG_CONTENT")
}
for (const [key, value] of Object.entries(auth)) {
if (value.type === "wellknown") {
process.env[value.key] = value.token