Merge pull request #19824 from Microsoft/fix-rwc-lib-in-tsconfig
Fix RWC's handling of "lib" from tsconfig
This commit is contained in:
commit
7a45573311
2 changed files with 4 additions and 3 deletions
|
@ -2146,8 +2146,8 @@ namespace Harness {
|
|||
return filePath.indexOf(Harness.libFolder) === 0;
|
||||
}
|
||||
|
||||
export function getDefaultLibraryFile(io: Harness.Io): Harness.Compiler.TestFile {
|
||||
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + Harness.Compiler.defaultLibFileName;
|
||||
export function getDefaultLibraryFile(filePath: string, io: Harness.Io): Harness.Compiler.TestFile {
|
||||
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + ts.getBaseFileName(ts.normalizeSlashes(filePath));
|
||||
return { unitName: libFile, content: io.readFile(libFile) };
|
||||
}
|
||||
|
||||
|
|
|
@ -131,13 +131,14 @@ namespace RWC {
|
|||
}
|
||||
else {
|
||||
// set the flag to put default library to the beginning of the list
|
||||
inputFiles.unshift(Harness.getDefaultLibraryFile(oldIO));
|
||||
inputFiles.unshift(Harness.getDefaultLibraryFile(fileRead.path, oldIO));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// do not use lib since we already read it in above
|
||||
opts.options.lib = undefined;
|
||||
opts.options.noLib = true;
|
||||
|
||||
// Emit the results
|
||||
|
|
Loading…
Reference in a new issue