File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -273,19 +273,18 @@ export function locateConfigFile(commandLine: ParsedCommandLine): ts.Diagnostic
273273 return diagnosticFactories . optionProjectCannotBeMixedWithSourceFilesOnACommandLine ( ) ;
274274 }
275275
276+ // TODO: Unlike tsc, this resolves `.` to absolute path
276277 const fileOrDirectory = normalizeSlashes ( path . resolve ( ts . sys . getCurrentDirectory ( ) , project ) ) ;
277- if ( ! fileOrDirectory || ts . sys . directoryExists ( fileOrDirectory ) ) {
278+ if ( ts . sys . directoryExists ( fileOrDirectory ) ) {
278279 const configFileName = path . posix . join ( fileOrDirectory , "tsconfig.json" ) ;
279280 if ( ts . sys . fileExists ( configFileName ) ) {
280281 return configFileName ;
281282 } else {
282283 return diagnosticFactories . cannotFindATsconfigJsonAtTheSpecifiedDirectory ( project ) ;
283284 }
285+ } else if ( ts . sys . fileExists ( fileOrDirectory ) ) {
286+ return fileOrDirectory ;
284287 } else {
285- if ( ts . sys . fileExists ( fileOrDirectory ) ) {
286- return fileOrDirectory ;
287- } else {
288- return diagnosticFactories . theSpecifiedPathDoesNotExist ( project ) ;
289- }
288+ return diagnosticFactories . theSpecifiedPathDoesNotExist ( project ) ;
290289 }
291290}
You can’t perform that action at this time.
0 commit comments