fixed bug

This commit is contained in:
2026-10-14 16:59:15 -04:00
parent 53b55ca0eb
commit 11bc57e665
2 changed files with 60 additions and 3 deletions
+4 -1
View File
@@ -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