electron/spec-main/fixtures/auto-update/check/index.js
2020-03-20 13:28:31 -07:00

23 lines
397 B
JavaScript

process.on('uncaughtException', (err) => {
console.error(err);
process.exit(1);
});
const { autoUpdater } = require('electron');
autoUpdater.on('error', (err) => {
console.error(err);
process.exit(1);
});
const feedUrl = process.argv[1];
autoUpdater.setFeedURL({
url: feedUrl
});
autoUpdater.checkForUpdates();
autoUpdater.on('update-not-available', () => {
process.exit(0);
});