Gap
The per-file BeforeDiscovery bootstrap in unit-test files calls Invoke-psake -TaskList 'Build' and proceeds straight to setting $Env:BHBuildOutput / Import-Module, without checking $psake.build_success.
If the Build task fails, the failure is swallowed and the next steps surface as a confusing path-not-found / import error rather than the actual build failure.
BeforeDiscovery {
if ($null-eq$Env:BHBuildOutput) {
$invokePsakeParameters=@{
TaskList='Build'BuildFile=$buildFilePath
}
Invoke-psake@invokePsakeParameters# <-- missing: if (-not $psake.build_success) { throw ... }
}
...
}Scope
Same gap in all 4 repos using this convention:
Fixing in the template propagates to derived repos on their next sync.
Fix sketch
In tests/Unit/Public/Get-{{Prefix}}Example.tests.ps1 and tests/Unit/Private/*.tests.ps1, after the Invoke-psake call:
Invoke-psake@invokePsakeParametersif (-not$psake.build_success) {
throw"Build task failed; cannot Import-Module the staged manifest. See psake output above."
}Surfaced by
Copilot review on tablackburn/SrrDBAutomationToolkit PR #15 (responded as won't-fix in that PR — the right place is here so all derived repos inherit it).
Gap
The per-file
BeforeDiscoverybootstrap in unit-test files callsInvoke-psake -TaskList 'Build'and proceeds straight to setting$Env:BHBuildOutput/Import-Module, without checking$psake.build_success.If the Build task fails, the failure is swallowed and the next steps surface as a confusing path-not-found / import error rather than the actual build failure.
BeforeDiscovery { if ($null-eq$Env:BHBuildOutput) { $invokePsakeParameters=@{ TaskList='Build'BuildFile=$buildFilePath } Invoke-psake@invokePsakeParameters# <-- missing: if (-not $psake.build_success) { throw ... } } ... }Scope
Same gap in all 4 repos using this convention:
tablackburn/PowerShellModuleTemplate(canonical)tablackburn/JsmOperationstablackburn/YouTubeMusicPS(post-PR-refactor(build): drop $_ prefix from helper variable names #20)tablackburn/SrrDBAutomationToolkit(post-PR-Add template-level CHANGELOG.md (CalVer) #15)Fixing in the template propagates to derived repos on their next sync.
Fix sketch
In
tests/Unit/Public/Get-{{Prefix}}Example.tests.ps1andtests/Unit/Private/*.tests.ps1, after theInvoke-psakecall:Surfaced by
Copilot review on
tablackburn/SrrDBAutomationToolkitPR #15 (responded as won't-fix in that PR — the right place is here so all derived repos inherit it).