1 Commits

Author SHA1 Message Date
Quang Lam
1fc0005ae8 fix: merged ASAR does not unpack when there is only one unpacked file (#55) 2022-10-18 17:17:11 -07:00

View File

@@ -195,8 +195,15 @@ export const mergeASARs = async ({
const resolvedUnpack = Array.from(unpackedFiles).map((file) => path.join(x64Dir, file)); const resolvedUnpack = Array.from(unpackedFiles).map((file) => path.join(x64Dir, file));
let unpack: string | undefined;
if (resolvedUnpack.length > 1) {
unpack = `{${resolvedUnpack.join(',')}}`;
} else if (resolvedUnpack.length === 1) {
unpack = resolvedUnpack[0];
}
await asar.createPackageWithOptions(x64Dir, outputAsarPath, { await asar.createPackageWithOptions(x64Dir, outputAsarPath, {
unpack: `{${resolvedUnpack.join(',')}}`, unpack,
}); });
d('done merging'); d('done merging');