Merge from master

This commit is contained in:
Raj Musuku
2019-02-21 17:56:04 -08:00
parent 5a146e34fa
commit 666ae11639
11482 changed files with 119352 additions and 255574 deletions

View File

@@ -3,8 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as electron from 'electron';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { Event, fromNodeEventEmitter } from 'vs/base/common/event';
@@ -45,8 +43,12 @@ export class DarwinUpdateService extends AbstractUpdateService {
}
private onError(err: string): void {
this.logService.error('UpdateService error: ', err);
this.setState(State.Idle(UpdateType.Archive));
this.logService.error('UpdateService error:', err);
// only show message when explicitly checking for updates
const shouldShowMessage = this.state.type === StateType.CheckingForUpdates ? !!this.state.context : true;
const message: string | undefined = shouldShowMessage ? err : undefined;
this.setState(State.Idle(UpdateType.Archive, message));
}
protected buildUpdateFeedUrl(quality: string): string | undefined {
@@ -109,7 +111,9 @@ export class DarwinUpdateService extends AbstractUpdateService {
// we workaround this issue by forcing an explicit flush of the storage data.
// see also https://github.com/Microsoft/vscode/issues/172
this.logService.trace('update#quitAndInstall(): calling flushStorageData()');
electron.session.defaultSession.flushStorageData();
if (electron.session.defaultSession) {
electron.session.defaultSession.flushStorageData();
}
this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()');
electron.autoUpdater.quitAndInstall();