mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 01:25:38 -05:00
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { EOL } from 'os';
|
||||
import { delimiter } from 'path';
|
||||
import { SemVer } from 'semver';
|
||||
import { SemVer, compare } from 'semver';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { Command, ITool, OsType, ToolStatus, ToolType } from '../../interfaces';
|
||||
@@ -63,11 +63,11 @@ export abstract class ToolBase implements ITool {
|
||||
return this._onDidUpdateData.event;
|
||||
}
|
||||
|
||||
protected get status(): ToolStatus {
|
||||
get status(): ToolStatus {
|
||||
return this._status;
|
||||
}
|
||||
|
||||
protected set status(value: ToolStatus) {
|
||||
set status(value: ToolStatus) {
|
||||
this._status = value;
|
||||
this._onDidUpdateData.fire(this);
|
||||
}
|
||||
@@ -270,6 +270,13 @@ export abstract class ToolBase implements ITool {
|
||||
}
|
||||
}
|
||||
|
||||
isSameOrNewerThan(version: string): boolean {
|
||||
const currentVersion = new SemVer(this.fullVersion!);
|
||||
const requiredVersion = new SemVer(version);
|
||||
|
||||
return compare(currentVersion, requiredVersion) >= 0;
|
||||
}
|
||||
|
||||
private _storagePathEnsured: boolean = false;
|
||||
private _status: ToolStatus = ToolStatus.NotInstalled;
|
||||
private _osType: OsType;
|
||||
|
||||
Reference in New Issue
Block a user