Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
5nord committed Nov 4, 2021
1 parent 9c16241 commit 2d77c7c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ export async function activateLanguageServer(context: vscode.ExtensionContext, s
} else {
separator = ':';
}
let pathList: string[] = conf.get('server.toolsPath')!;
toolsPath = pathList.join(separator);
if (toolsPath.length > 0) {
toolsPath = toolsPath + separator + process.env['PATH']!;
} else {
toolsPath = process.env['PATH']!;
let pathList: string[]|undefined = conf.get('server.toolsPath');
if (pathList) {
toolsPath = pathList.join(separator);
if (toolsPath.length > 0) {
toolsPath = toolsPath + separator + process.env['PATH']!;
} else {
toolsPath = process.env['PATH']!;
}
}
outputChannel.appendLine('toolsPath: ' + toolsPath);
let serverOptions: ServerOptions = {
Expand Down

0 comments on commit 2d77c7c

Please sign in to comment.