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
+17
View File
@@ -0,0 +1,17 @@
'use strict';
function resolveInvocationEnvironment(options = {}) {
if (Object.prototype.hasOwnProperty.call(options, 'env')) {
return options.env || {};
}
if (typeof options.homeDir === 'string' && options.homeDir.trim() !== '') {
return {};
}
return process.env;
}
module.exports = {
resolveInvocationEnvironment,
};