Fixed OPENCODE_CONFIG_DIR to load config files. (#4400)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2025-11-16 23:48:36 -06:00
committed by GitHub
parent 2535f9febf
commit 3c6dcad2af

View File

@@ -75,7 +75,7 @@ export namespace Config {
for (const dir of directories) {
await assertValid(dir)
if (dir.endsWith(".opencode")) {
if (dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) {
for (const file of ["opencode.jsonc", "opencode.json"]) {
log.debug(`loading config from ${path.join(dir, file)}`)
result = mergeDeep(result, await loadFile(path.join(dir, file)))