From 1567e662ccfe9a8e034e6eecb1ac68d5fc754805 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 3 Dec 2018 11:07:50 +0100 Subject: [PATCH] only show update service errors when asking explicitly fixes #61467 fixes #60966 --- src/vs/platform/update/electron-main/updateService.darwin.ts | 5 ++++- src/vs/platform/update/electron-main/updateService.linux.ts | 5 ++++- src/vs/platform/update/electron-main/updateService.win32.ts | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index 99923f036fe..768cbcad49f 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -44,7 +44,10 @@ export class DarwinUpdateService extends AbstractUpdateService { private onError(err: string): void { this.logService.error('UpdateService error:', err); - this.setState(State.Idle(UpdateType.Archive, err)); + + // only show message when explicitly checking for updates + const message: string | undefined = !!context ? err : undefined; + this.setState(State.Idle(UpdateType.Archive, message)); } protected buildUpdateFeedUrl(quality: string): string | undefined { diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts index 2439e47bacb..62a9577559a 100644 --- a/src/vs/platform/update/electron-main/updateService.linux.ts +++ b/src/vs/platform/update/electron-main/updateService.linux.ts @@ -73,7 +73,10 @@ export class LinuxUpdateService extends AbstractUpdateService { } */ this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); - this.setState(State.Idle(UpdateType.Archive, err.message || err)); + + // only show message when explicitly checking for updates + const message: string | undefined = !!context ? (err.message || err) : undefined; + this.setState(State.Idle(UpdateType.Archive, message)); }); } } diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index b4d3a30a3f0..7af4012a46b 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -172,7 +172,10 @@ export class Win32UpdateService extends AbstractUpdateService { } */ this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); - this.setState(State.Idle(getUpdateType(), err.message || err)); + + // only show message when explicitly checking for updates + const message: string | undefined = !!context ? (err.message || err) : undefined; + this.setState(State.Idle(getUpdateType(), message)); }); } -- GitLab