Fallback to bundled version if selected TS version is invalid

Fixes #103213

This restores some logic that we removed during the web refactoring
This commit is contained in:
Matt Bierner 2020-08-03 15:08:16 -07:00
parent 83e542bd07
commit 0009a0b424

View file

@ -366,6 +366,12 @@ export default class TypeScriptServiceClient extends Disposable implements IType
}
let version = this._versionManager.currentVersion;
if (!version.isValid) {
vscode.window.showWarningMessage(localize('noServerFound', 'The path {0} doesn\'t point to a valid tsserver install. Falling back to bundled TypeScript version.', version.path));
this._versionManager.reset();
version = this._versionManager.currentVersion;
}
this.info(`Using tsserver from: ${version.path}`);