Skip to content

Commit

Permalink
fix issue electron-userland#4639: 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.
  • Loading branch information
jhbsa authored May 10, 2020
1 parent 2e49f0b commit cba10e3
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 cba10e3

Please sign in to comment.