Skip to content

Commit

Permalink
add promises to async task manager
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta committed Nov 4, 2024
1 parent 20d3111 commit 86bfb27
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/app-builder-lib/src/asar/asarUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ export class AsarPackager {
// const dest = path.resolve(this.rootForAppFilesWithoutAsar, relative)

// matchUnpacker(file, dest, metadata)
// taskManager.addTask(
await writeFileOrQueueSymlink({ transformedData, file, destFile, stat, fileSet })
// )
taskManager.addTask(writeFileOrQueueSymlink({ transformedData, file, destFile, stat, fileSet }))

if (taskManager.tasks.length > MAX_FILE_REQUESTS) {
await taskManager.awaitTasks()
Expand All @@ -163,9 +161,8 @@ export class AsarPackager {
// finish copy then set up all symlinks
await taskManager.awaitTasks()
for (const it of links) {
// taskManager.addTask(
await symlink(it.link, it.file, symlinkType)
// )
taskManager.addTask(symlink(it.link, it.file, symlinkType))

if (taskManager.tasks.length > MAX_FILE_REQUESTS) {
await taskManager.awaitTasks()
}
Expand Down

0 comments on commit 86bfb27

Please sign in to comment.