Merge pull request #1556 from microsoft/bruce/fixextractcomp8-29
Fix ExtractCompressNuGet.ps1 in tools
This commit is contained in:
Коммит
0945bd0e82
|
@ -10,9 +10,14 @@ 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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче