fix: ensure app load is limited to real asar files when appropriate (#39788)
This commit is contained in:
parent
ac040bf734
commit
16aec702b4
4 changed files with 20 additions and 1 deletions
|
@ -27,7 +27,7 @@ const cachedArchives = new Map<string, NodeJS.AsarArchive>();
|
|||
const getOrCreateArchive = (archivePath: string) => {
|
||||
const isCached = cachedArchives.has(archivePath);
|
||||
if (isCached) {
|
||||
return cachedArchives.get(archivePath);
|
||||
return cachedArchives.get(archivePath)!;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -39,6 +39,8 @@ const getOrCreateArchive = (archivePath: string) => {
|
|||
}
|
||||
};
|
||||
|
||||
process._getOrCreateArchive = getOrCreateArchive;
|
||||
|
||||
const asarRe = /\.asar/i;
|
||||
|
||||
const { getValidatedPath } = __non_webpack_require__('internal/fs/utils');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue