diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index e4c30cdabe8..18280ecefdb 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2533,7 +2533,7 @@ namespace ts { function normalizeNonListOptionValue(option: CommandLineOption, basePath: string, value: any): CompilerOptionsValue { if (option.isFilePath) { - value = normalizePath(combinePaths(basePath, value)); + value = getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } diff --git a/src/tsc/executeCommandLine.ts b/src/tsc/executeCommandLine.ts index 1496ac39931..201cbb4e8cd 100644 --- a/src/tsc/executeCommandLine.ts +++ b/src/tsc/executeCommandLine.ts @@ -241,10 +241,9 @@ namespace ts { } const currentDirectory = sys.getCurrentDirectory(); - const getCanonicalFileName = createGetCanonicalFileName(sys.useCaseSensitiveFileNames); const commandLineOptions = convertToOptionsWithAbsolutePaths( commandLine.options, - fileName => toPath(fileName, currentDirectory, getCanonicalFileName) + fileName => getNormalizedAbsolutePath(fileName, currentDirectory) ); if (configFileName) { const configParseResult = parseConfigFileWithSystem(configFileName, commandLineOptions, sys, reportDiagnostic)!; // TODO: GH#18217 diff --git a/tests/baselines/reference/tsc/incremental/no-change-run/when-passing-rootDir-is-in-the-tsconfig.js b/tests/baselines/reference/tsc/incremental/no-change-run/when-passing-rootDir-is-in-the-tsconfig.js index 4c7d66a03f8..6dd851d6f1f 100644 --- a/tests/baselines/reference/tsc/incremental/no-change-run/when-passing-rootDir-is-in-the-tsconfig.js +++ b/tests/baselines/reference/tsc/incremental/no-change-run/when-passing-rootDir-is-in-the-tsconfig.js @@ -3,5 +3,3 @@ exitCode:: ExitStatus.Success -//// [/src/project/built/src/main.js] file written with same contents -//// [/src/project/built/tsconfig.tsbuildinfo] file written with same contents