Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit f0c8e02

Browse files
author
Tom van Ommeren
committed
fix: Normalise typeRoots and filePath used against config checks to forward slashes
Fixes typeroots support in Windows
1 parent 7f57e21 commit f0c8e02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/project-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ export class ProjectConfiguration {
343343
const options = configParseResult.options
344344
const pathResolver = /^[a-z]:\//i.test(base) ? path.win32 : path.posix
345345
this.typeRoots = options.typeRoots ?
346-
options.typeRoots.map((r: string) => pathResolver.resolve(this.rootFilePath, r)) :
346+
options.typeRoots.map((r: string) => toUnixPath(pathResolver.resolve(this.rootFilePath, r))) :
347347
[]
348348

349349
if (/(^|\/)jsconfig\.json$/.test(this.configFilePath)) {
@@ -833,7 +833,7 @@ export class ProjectManager implements Disposable {
833833
return traceObservable('Ensure config dependencies', childOf, span => {
834834
if (!this.ensuredConfigDependencies) {
835835
this.ensuredConfigDependencies = observableFromIterable(this.inMemoryFs.uris())
836-
.filter(uri => this.isConfigDependency(uri2path(uri)))
836+
.filter(uri => this.isConfigDependency(toUnixPath(uri2path(uri))))
837837
.mergeMap(uri => this.updater.ensure(uri))
838838
.do(noop, err => {
839839
this.ensuredConfigDependencies = undefined

0 commit comments

Comments
 (0)