Skip to content

Commit

Permalink
fix(dmg): require().split is not a function
Browse files Browse the repository at this point in the history
Prior commit did not properly reference the desired os.release() function and caused dmg build to fail.

Close #4639
  • Loading branch information
jhbsa authored May 14, 2020
1 parent 2e49f0b commit dfcd010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dmg-builder/src/dmg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit dfcd010

Please sign in to comment.