mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 02:32:35 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -53,16 +53,16 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
private availableUpdate: IAvailableUpdate | undefined;
|
||||
|
||||
@memoize
|
||||
get cachePath(): Thenable<string> {
|
||||
get cachePath(): Promise<string> {
|
||||
// {{SQL CARBON EDIT}}
|
||||
const result = path.join(tmpdir(), `sqlops-update-${product.target}-${process.arch}`);
|
||||
return pfs.mkdirp(result, null).then(() => result);
|
||||
return pfs.mkdirp(result, undefined).then(() => result);
|
||||
}
|
||||
|
||||
constructor(
|
||||
@ILifecycleService lifecycleService: ILifecycleService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@IRequestService requestService: IRequestService,
|
||||
@ILogService logService: ILogService
|
||||
@@ -144,7 +144,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
|
||||
return this.requestService.request({ url }, CancellationToken.None)
|
||||
.then(context => download(downloadPath, context))
|
||||
.then(hash ? () => checksum(downloadPath, update.hash) : () => null)
|
||||
.then(hash ? () => checksum(downloadPath, update.hash) : () => undefined)
|
||||
.then(() => pfs.rename(downloadPath, updatePackagePath))
|
||||
.then(() => updatePackagePath);
|
||||
});
|
||||
@@ -165,7 +165,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
});
|
||||
});
|
||||
})
|
||||
.then(null, err => {
|
||||
.then(undefined, err => {
|
||||
this.logService.error(err);
|
||||
/* __GDPR__
|
||||
"update:notAvailable" : {
|
||||
@@ -181,7 +181,9 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
}
|
||||
|
||||
protected async doDownloadUpdate(state: AvailableForDownload): Promise<void> {
|
||||
shell.openExternal(state.update.url);
|
||||
if (state.update.url) {
|
||||
shell.openExternal(state.update.url);
|
||||
}
|
||||
this.setState(State.Idle(getUpdateType()));
|
||||
}
|
||||
|
||||
@@ -210,11 +212,11 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
|
||||
protected async doApplyUpdate(): Promise<void> {
|
||||
if (this.state.type !== StateType.Downloaded && this.state.type !== StateType.Downloading) {
|
||||
return Promise.resolve(null);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
if (!this.availableUpdate) {
|
||||
return Promise.resolve(null);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
const update = this.state.update;
|
||||
@@ -245,7 +247,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
}
|
||||
|
||||
protected doQuitAndInstall(): void {
|
||||
if (this.state.type !== StateType.Ready) {
|
||||
if (this.state.type !== StateType.Ready || !this.availableUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user