MCPcopy
hub / github.com/wavetermdev/waveterm / configureAutoUpdater

Function configureAutoUpdater

emain/updater.ts:230–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228 * Configures the auto-updater based on the user's preference
229 */
230export async function configureAutoUpdater() {
231 if (isDev()) {
232 console.log("skipping auto-updater in dev mode");
233 return;
234 }
235
236 // simple lock to prevent multiple auto-update configuration attempts, this should be very rare
237 if (autoUpdateLock) {
238 console.log("auto-update configuration already in progress, skipping");
239 return;
240 }
241 autoUpdateLock = true;
242
243 try {
244 console.log("Configuring updater");
245 const settings = (await RpcApi.GetFullConfigCommand(ElectronWshClient)).settings;
246 updater = new Updater(settings);
247 await updater.start();
248 } catch (e) {
249 console.warn("error configuring updater", e.toString());
250 }
251
252 autoUpdateLock = false;
253}

Callers 1

appMainFunction · 0.90

Calls 3

isDevFunction · 0.85
startMethod · 0.80
GetFullConfigCommandMethod · 0.65

Tested by

no test coverage detected