From 9334e135d89cf8bfb01d7e8660720f88e374ffc3 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Sat, 26 Mar 2016 17:46:53 -0700 Subject: [PATCH] Normalize `tsconfig.json` path before searching --- src/compiler/program.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b528143384e..d8de04e6331 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -15,8 +15,8 @@ namespace ts { export const version = "1.9.0"; export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string { - let fileName = "tsconfig.json"; while (true) { + const fileName = combinePaths(searchPath, "tsconfig.json"); if (fileExists(fileName)) { return fileName; } @@ -25,7 +25,6 @@ namespace ts { break; } searchPath = parentPath; - fileName = "../" + fileName; } return undefined; }