Skip to content

Commit

Permalink
Revert PR 4898 for ExtractCompressNuGet.ps1 (4.11) (#4904)
Browse files Browse the repository at this point in the history
* Revert "Remove the patch install from ExtractCompressNuGet.ps1 (4.11) (#4898)"

This reverts commit 9e2e2ce.

* Add comment

* Switch to installing version 1.2.5.

* TWeak to always show currently installed version
  • Loading branch information
BruceHaley authored Nov 2, 2020
1 parent 9e2e2ce commit 26260a2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build/ExtractCompressNuGet.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ param
)
pushd $path

# Download temporary version of Archive module that fixes issue on macOS/Linux with path separator
#Invoke-WebRequest -Uri "https://raw.githubusercontent.com/PowerShell/Microsoft.PowerShell.Archive/master/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1" -OutFile .\archive.psm1
#Import-Module .\archive.psm1

# Ensure Powershell.Archive minimum version 1.2.3.0 is installed. That fixes a path separator issue on macOS/Linux.
# An "ObjectNotFound" error can result from a temporary Powershell module repository outage.
$ver = (Get-Command -Module Microsoft.PowerShell.Archive | Select-Object -Property version -First 1).Version.ToString()
Write-Host "Currently installed: Microsoft.Powershell.Archive $ver"
if ($ver -lt '1.2.3.0') {
Write-Host "Installing Microsoft.Powershell.Archive 1.2.5 (fix for Linux path separator bug)"
Install-Module -Name Microsoft.PowerShell.Archive -MinimumVersion '1.2.5' -AllowClobber -Force -AcceptLicense
}

[int]$itemsProcessed = 0
if ($extract) {
# Extract .nupkg packages in the path.
Expand Down

0 comments on commit 26260a2

Please sign in to comment.