From dfcd010c1e3d7593404832fa8c4c53baddaa8a3b Mon Sep 17 00:00:00 2001 From: jhbsa Date: Thu, 14 May 2020 05:01:42 -0400 Subject: [PATCH] fix(dmg): require().split is not a function Prior commit did not properly reference the desired os.release() function and caused dmg build to fail. Close #4639 --- packages/dmg-builder/src/dmg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dmg-builder/src/dmg.ts b/packages/dmg-builder/src/dmg.ts index 807e6af33ee..63eb73f5256 100644 --- a/packages/dmg-builder/src/dmg.ts +++ b/packages/dmg-builder/src/dmg.ts @@ -58,7 +58,7 @@ export class DmgTarget extends Target { args.push("-imagekey", `zlib-level=${process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL || "9"}`) } await spawn("hdiutil", addLogLevel(args)) - if (this.options.internetEnabled && parseInt(require("os").split(".")[0], 10) < 19) { + if (this.options.internetEnabled && parseInt(require("os").release().split(".")[0], 10) < 19) { await exec("hdiutil", addLogLevel(["internet-enable"]).concat(artifactPath)) }