File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as v from "vscode-languageserver";
4
4
import * as rpc from "vscode-jsonrpc/node" ;
5
5
import * as path from "path" ;
6
6
import fs from "fs" ;
7
+ import os from "os" ;
7
8
// TODO: check DidChangeWatchedFilesNotification.
8
9
import {
9
10
DidOpenTextDocumentNotification ,
@@ -935,6 +936,17 @@ function onMessage(msg: p.Message) {
935
936
936
937
if ( initialConfiguration != null ) {
937
938
extensionConfiguration = initialConfiguration ;
939
+ if (
940
+ extensionConfiguration . binaryPath !== null &&
941
+ extensionConfiguration . binaryPath [ 0 ] === "~"
942
+ ) {
943
+ // What should happen if the path contains the home directory symbol?
944
+ // This situation is handled below, but maybe it isn't the best option.
945
+ extensionConfiguration . binaryPath = path . join (
946
+ os . homedir ( ) ,
947
+ extensionConfiguration . binaryPath . slice ( 1 )
948
+ ) ;
949
+ }
938
950
}
939
951
940
952
send ( response ) ;
You can’t perform that action at this time.
0 commit comments