mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-10 11:47:54 +02:00
fix(opencode): isolate explicit home contexts
This commit is contained in:
@@ -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,
|
||||
};
|
||||
Reference in New Issue
Block a user