mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Use getNormalizedAbsolutePath to combine basePath and config value for file names
Fixes #34502 by being consistent in path normalization
This commit is contained in:
parent
a4044ca684
commit
9fa7d8b3b9
@ -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 = ".";
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user