mirror of
https://github.com/affaan-m/ECC.git
synced 2026-08-28 18:59:47 +02:00
18 lines
359 B
JavaScript
18 lines
359 B
JavaScript
'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,
|
|
};
|