Update lib/node/asar-fs-wrapper.ts

This commit is contained in:
Sam Maddock
2025-03-18 11:24:35 -04:00
committed by GitHub
parent b5feaf9ba7
commit 73f6452fec

View File

@@ -1018,7 +1018,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
const { getNearestParentPackageJSONType } = moduleBinding;
internalBinding('modules').getNearestParentPackageJSONType = (checkPath: string) => {
const pathInfo = splitPath(checkPath);
if (!pathInfo.isAsar) return getNearestParentPackageJSON(checkPath);
if (!pathInfo.isAsar) return getNearestParentPackageJSONType(checkPath);
const { asarPath, filePath } = pathInfo;
const archive = getOrCreateArchive(asarPath);