fixed bug
This commit is contained in:
@@ -249,7 +249,10 @@ function Initialize-OfficeMedia {
|
||||
$scrubZip = Join-Path $Workspace 'GetHelp.zip'
|
||||
Save-OfficeDownload $definitions.GetHelpUrl $scrubZip
|
||||
$scrubFolder = Join-Path $Workspace 'GetHelp'
|
||||
Expand-Archive -LiteralPath $scrubZip -DestinationPath $scrubFolder -ErrorAction Stop
|
||||
$null = Write-Output "Extracting Get Help: $scrubZip -> $scrubFolder"
|
||||
# Tools.ps1 overrides Expand-Archive with a Path-only wrapper. Use the PS 5.1
|
||||
# module explicitly for literal paths, while keeping diagnostics in the Tools log.
|
||||
Microsoft.PowerShell.Archive\Expand-Archive -LiteralPath $scrubZip -DestinationPath $scrubFolder -ErrorAction Stop
|
||||
$scrub = @(Get-ChildItem -LiteralPath $scrubFolder -Filter $definitions.GetHelpExecutable -File -Recurse)
|
||||
if ($scrub.Count -ne 1) { throw "Microsoft download did not contain exactly one $($definitions.GetHelpExecutable)." }
|
||||
Assert-OfficeMicrosoftSignature $scrub[0].FullName
|
||||
|
||||
Reference in New Issue
Block a user