Skip to content

Commit

Permalink
Fix #595
Browse files Browse the repository at this point in the history
The cwd and configFileName should be normalized, see:
https://github.com/Microsoft/TypeScript/blob/16d7f4c1033cf1852a2904845b0568f932ed4f21/src/compiler/tsc.ts#L104

This affects only Windows where backslash is the path separator.
  • Loading branch information
ljani committed May 23, 2018
1 parent df41bdb commit 86176de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,10 @@ function readConfig (

// Read project configuration when available.
if (!noProject) {
configFileName = project ? resolve(cwd, project) : ts.findConfigFile(cwd, fileExists)
configFileName = project ? resolve(cwd, project) : ts.findConfigFile(normalizeSlashes(cwd), fileExists)

if (configFileName) {
configFileName = normalizeSlashes(configFileName)
const result = ts.readConfigFile(configFileName, readFile)

if (result.error) {
Expand Down

0 comments on commit 86176de

Please sign in to comment.