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