Skip to content

Commit

Permalink
fix(dmg): adding 10% on size for temporary dmg used in hdiutil (#4171)
Browse files Browse the repository at this point in the history
Close #3301
  • Loading branch information
vladotesanovic authored and develar committed Sep 23, 2019
1 parent ebbd9f7 commit 1d21620
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/dmg-builder/src/dmg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export class DmgTarget extends Target {
// https://github.com/electron-userland/electron-builder/issues/2115
const backgroundFile = specification.background == null ? null : await transformBackgroundFileIfNeed(specification.background, packager.info.tempDirManager)
const finalSize = await computeAssetSize(packager.info.cancellationToken, tempDmg, specification, backgroundFile)
await exec("hdiutil", ["resize", "-size", finalSize.toString(), tempDmg])
const expandingFinalSize = (finalSize * 0.1) + finalSize
await exec("hdiutil", ["resize", "-size", expandingFinalSize.toString(), tempDmg])

const volumePath = path.join("/Volumes", volumeName)
if (await exists(volumePath)) {
Expand Down

0 comments on commit 1d21620

Please sign in to comment.