mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 19:13:34 +08:00
fix(@angular/build): ensure matching coverage excludes with karma on Windows
When on Windows, the coverage exclusion paths need to be made absolute via the Node.js path builtin to ensure matching with the files during the build process.
This commit is contained in:
parent
c39c3440cf
commit
c8c73185a6
@ -614,7 +614,7 @@ function getInstrumentationExcludedPaths(root: string, excludedPaths: string[]):
|
||||
|
||||
for (const excludeGlob of excludedPaths) {
|
||||
const excludePath = excludeGlob[0] === '/' ? excludeGlob.slice(1) : excludeGlob;
|
||||
globSync(excludePath, { absolute: true, cwd: root }).forEach((p) => excluded.add(p));
|
||||
globSync(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root, p)));
|
||||
}
|
||||
|
||||
return excluded;
|
||||
|
Loading…
x
Reference in New Issue
Block a user