fix: asar integration for require('node:child_process') (#38742)
This commit is contained in:
parent
46458ab517
commit
dc2e822dc7
2 changed files with 56 additions and 51 deletions
|
@ -838,7 +838,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
const originalModuleLoad = Module._load;
|
||||
Module._load = (request: string, ...args: any[]) => {
|
||||
const loadResult = originalModuleLoad(request, ...args);
|
||||
if (request === 'child_process') {
|
||||
if (request === 'child_process' || request === 'node:child_process') {
|
||||
if (!asarReady.has(loadResult)) {
|
||||
asarReady.add(loadResult);
|
||||
// Just to make it obvious what we are dealing with here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue