basic-electron-updater
Version:
A secure, cross-platform auto-update library for Electron Forge apps using GitHub Releases.
19 lines (18 loc) • 667 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyMacUpdate = applyMacUpdate;
const child_process_1 = require("child_process");
/**
* Opens the DMG or ZIP in Finder, or launches the installer.
*/
function applyMacUpdate(installerPath) {
return new Promise((resolve, reject) => {
(0, child_process_1.execFile)("open", [installerPath], (err) => {
if (err)
return reject(err);
// For .pkg files, don't quit immediately as user needs to complete installation
// For .dmg/.zip files, user will handle the update manually
resolve();
});
});
}