@danmoisan/drm-copilot-mcp 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -343,7 +343,27 @@ function Invoke-PoshQCTest {
|
|
|
343
343
|
if ([IO.Path]::IsPathRooted($_)) { $_ } else { Join-Path $Root $_ }
|
|
344
344
|
}
|
|
345
345
|
)
|
|
346
|
-
|
|
346
|
+
|
|
347
|
+
# Prune coverage paths that do not exist under the resolved root before Pester sees
|
|
348
|
+
# them. Pester's Resolve-CoverageInfo discards the whole set and raises a terminating
|
|
349
|
+
# error on the first unresolvable entry, which aborts the run at RunStart in any
|
|
350
|
+
# workspace that does not contain this repository's coverage layout (issue #409).
|
|
351
|
+
# Rooted entries are tested as-is; they are never re-joined to $Root.
|
|
352
|
+
$survivingCoveragePaths = @($resolvedCoveragePaths | Where-Object { & $TestPathExists $_ })
|
|
353
|
+
foreach ($prunedPath in @($resolvedCoveragePaths | Where-Object { $survivingCoveragePaths -notcontains $_ })) {
|
|
354
|
+
# Log every prune individually so coverage removal is never silent.
|
|
355
|
+
& $Logger "Pruned nonexistent code coverage path: $prunedPath"
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if ($survivingCoveragePaths.Count -gt 0) {
|
|
359
|
+
$config.CodeCoverage.Path = $survivingCoveragePaths
|
|
360
|
+
} else {
|
|
361
|
+
# An enabled-but-empty path set makes Pester instrument every Run.Path directory,
|
|
362
|
+
# so disable coverage for this invocation instead and continue with the test run.
|
|
363
|
+
$config.CodeCoverage.Enabled = $false
|
|
364
|
+
$coverageEnabled = $false
|
|
365
|
+
& $Logger "Code coverage disabled for this invocation: no configured coverage path exists under root '$Root'."
|
|
366
|
+
}
|
|
347
367
|
}
|
|
348
368
|
|
|
349
369
|
if ($config.CodeCoverage.OutputPath.Value) {
|