Skip to content

Commit 1d21620

Browse files
vladotesanovicdevelar
authored andcommitted
fix(dmg): adding 10% on size for temporary dmg used in hdiutil (#4171)
Close #3301
1 parent ebbd9f7 commit 1d21620

File tree

1 file changed

+2
-1
lines changed
  • packages/dmg-builder/src

1 file changed

+2
-1
lines changed

packages/dmg-builder/src/dmg.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export class DmgTarget extends Target {
3838
// https://github.com/electron-userland/electron-builder/issues/2115
3939
const backgroundFile = specification.background == null ? null : await transformBackgroundFileIfNeed(specification.background, packager.info.tempDirManager)
4040
const finalSize = await computeAssetSize(packager.info.cancellationToken, tempDmg, specification, backgroundFile)
41-
await exec("hdiutil", ["resize", "-size", finalSize.toString(), tempDmg])
41+
const expandingFinalSize = (finalSize * 0.1) + finalSize
42+
await exec("hdiutil", ["resize", "-size", expandingFinalSize.toString(), tempDmg])
4243

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

0 commit comments

Comments
 (0)