fix(opencode): isolate explicit home contexts

This commit is contained in:
haelyra
2026-08-25 12:17:21 -04:00
parent 2331afbfd3
commit 6ceab105bc
16 changed files with 50 additions and 10 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
const os = require('os');
const path = require('path');
const { resolveInvocationEnvironment } = require('./invocation-environment');
function configuredDirectory(environment, name) {
const value = environment && environment[name];
@@ -11,7 +12,7 @@ function configuredDirectory(environment, name) {
}
function resolveOpencodeConfigRoot(options = {}) {
const environment = options.env || process.env;
const environment = resolveInvocationEnvironment(options);
const explicitRoot = configuredDirectory(environment, 'OPENCODE_CONFIG_DIR');
if (explicitRoot) {
return explicitRoot;