Skip to content

Commit

Permalink
Normalize configFileName on initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed May 24, 2018
1 parent 98d72ce commit 33aca82
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Expand Up @@ -442,15 +442,17 @@ function readConfig (
noProject?: boolean | null
) {
let config = { compilerOptions: {} as any }
let basePath = cwd
let basePath = normalizeSlashes(cwd)
let configFileName: string | undefined = undefined

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

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

if (result.error) {
throw new TSError([formatDiagnostic(result.error, cwd, ts, 0)])
Expand Down

0 comments on commit 33aca82

Please sign in to comment.