I noticed this in recent troubleshooting of an internal issue on our build boxes (we don't use the hosted agents)
Seems that this default value
|
[string]$TargetPesterVersion = "latest" |
will then have an impact on potentially importing pester at this point
|
Import-Pester -Version $TargetPesterVersion |
I propose to fix this with some additional defensive coding just to be sure that Pester v5 will never accidentally import