12345678910111213141516171819202122232425262728 |
- 'use strict';
- let updateNotifier = require('.');
- const options = JSON.parse(process.argv[2]);
- updateNotifier = new updateNotifier.UpdateNotifier(options);
- (async () => {
-
- setTimeout(process.exit, 1000 * 30);
- const update = await updateNotifier.fetchInfo();
-
- updateNotifier.config.set('lastUpdateCheck', Date.now());
- if (update.type && update.type !== 'latest') {
- updateNotifier.config.set('update', update);
- }
-
-
- process.exit();
- })().catch(error => {
- console.error(error);
- process.exit(1);
- });
|