mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from master
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user