Build-Module.ps1 has code to install Pester 5 if it is not present. That code exists after the import of the Pester module happens.
If no version of the Pester module is present, the script would error before installing.
If any version earlier than 5.0.0.x of the Pester module was available, it would be loaded before the install was attempted and then error when attemping to access the static property of [PesterConfiguration]::Default.
This PR changes the order to
Check for a version of Pester 5.*
If there is no Pester 5 installed, then install Pester 5 from the PowerShell Gallery
PR Summary
Build-Module.ps1 has code to install Pester 5 if it is not present. That code exists after the import of the Pester module happens.
If no version of the Pester module is present, the script would error before installing.
If any version earlier than 5.0.0.x of the Pester module was available, it would be loaded before the install was attempted and then error when attemping to access the static property of
[PesterConfiguration]::Default
.This PR changes the order to
PR Checklist
Didn't update the changelog as this PR doesn't impact module functionality, just the new dev/build machine experience.