electron/spec-main/fixtures/auto-update/check/index.js

24 lines
397 B
JavaScript
Raw Normal View History

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