MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
445 stars 155 forks source link

Update order on installing Pester from Build-Module. #327

Closed smurawski closed 4 years ago

smurawski commented 4 years ago

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.