Skip to content

Commit 2fe3499

Browse files
committed
Fix faulty path handling
1 parent c667a98 commit 2fe3499

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/server/editorServices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ namespace ts.server {
472472
this.globalPlugins = opts.globalPlugins || emptyArray;
473473
this.pluginProbeLocations = opts.pluginProbeLocations || emptyArray;
474474
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
475-
this.typesMapLocation = (opts.typesMapLocation === undefined) ? combinePaths(this.getExecutingFilePath(), "../typesMap.json") : opts.typesMapLocation;
475+
this.typesMapLocation = (opts.typesMapLocation === undefined) ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
476476
this.syntaxOnly = opts.syntaxOnly;
477477

478478
Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");

src/tsserver/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ namespace ts.server {
920920
setStackTraceLimit();
921921

922922
const typingSafeListLocation = findArgument(Arguments.TypingSafeListLocation)!; // TODO: GH#18217
923-
const typesMapLocation = findArgument(Arguments.TypesMapLocation) || combinePaths(sys.getExecutingFilePath(), "../typesMap.json");
923+
const typesMapLocation = findArgument(Arguments.TypesMapLocation) || combinePaths(getDirectoryPath(sys.getExecutingFilePath()), "typesMap.json");
924924
const npmLocation = findArgument(Arguments.NpmLocation);
925925

926926
function parseStringArray(argName: string): ReadonlyArray<string> {

0 commit comments

Comments
 (0)