From 1d2162093f6639165934849a073144832541bfbe Mon Sep 17 00:00:00 2001 From: Vlado Tesanovic Date: Mon, 23 Sep 2019 07:55:04 +0200 Subject: [PATCH] fix(dmg): adding 10% on size for temporary dmg used in hdiutil (#4171) Close #3301 --- packages/dmg-builder/src/dmg.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dmg-builder/src/dmg.ts b/packages/dmg-builder/src/dmg.ts index 12dbd9bc96d..0f7b1ca5372 100644 --- a/packages/dmg-builder/src/dmg.ts +++ b/packages/dmg-builder/src/dmg.ts @@ -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)) {