From 19118e05326e8bbaf6857cc7612e32fa99a7d98a Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 5 Jul 2018 12:12:03 -0700 Subject: [PATCH] pin PackageManagement to 1.1.7.0 to maintain the ability to patch --- build.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index 1586776fee..2bff622634 100644 --- a/build.psm1 +++ b/build.psm1 @@ -652,7 +652,8 @@ function Restore-PSModuleToBuild $modulesDir = Join-Path -Path $publishPath -ChildPath "Modules" # Restore modules from powershellgallery feed - # PowerShellGet depends on PackageManagement module, so PackageManagement module will be installed with the PowerShellGet module. + # PowerShellGet depends on PackageManagement module, so we will install PackageManagement module first. + Restore-PSModule -Destination $modulesDir -Name 'PackageManagement' -RequiredVersion '1.1.7.0' -SourceLocation "https://www.powershellgallery.com/api/v2/" Restore-PSModule -Destination $modulesDir -Name 'PowerShellGet' -RequiredVersion '1.6.0' -SourceLocation "https://www.powershellgallery.com/api/v2/" Restore-PSModule -Destination $modulesDir -Name 'Microsoft.PowerShell.Archive' -SourceLocation "https://www.powershellgallery.com/api/v2/"