Skip to content

Commit

Permalink
Add "open" guard for AsarUtil to fix concurrent builds (#5567)
Browse files Browse the repository at this point in the history
* Add "open" guard for AsarUtil to fix concurrent builds (#5567)
* Remove file-streaming optimization for M1
* Restore original code, with open event handler guard
  • Loading branch information
elliottkember authored Feb 16, 2021
1 parent 11aa06c commit c348e31
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/app-builder-lib/src/asar/asarUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ export class AsarPackager {
const readStream = createReadStream(file)
readStream.on("error", reject)
readStream.once("end", () => w(index + 1))
readStream.pipe(writeStream, {
end: false
readStream.on("open", () => {
readStream.pipe(writeStream, {
end: false
})
})
}
}
Expand Down

0 comments on commit c348e31

Please sign in to comment.