electron/spec/global-paths.js
Cheng Zhao 959b657903
chore: remove Node.js patch on Module.globalPaths (#31275)
* chore: remove Node.js patch on Module.globalPaths

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2021-10-06 09:20:05 +09:00

13 lines
349 B
JavaScript

const Module = require('module');
module.exports = (paths) => {
const nodeModulePaths = Module._nodeModulePaths;
Module.ignoreGlobalPathsHack = false;
Module._nodeModulePaths = (from) => {
if (Module.ignoreGlobalPathsHack) {
return nodeModulePaths(from);
} else {
return nodeModulePaths(from).concat(paths);
}
};
};