Extract Get-HostMachineArch for the VC++ round-trip test (#7597)
#7549 taught Test-VCRedistInstalled to consult the host architecture before trusting the System32 DLL, but the round-trip job dot-sources a fixed list of functions out of setup.ps1 and that list did not gain the helper. Part A returns early on the registry hit, so only the clean-box half reaches the call and the job fails there with "Get-HostMachineArch is not recognized". Reproduced by dot-sourcing the old list and calling Test-VCRedistInstalled, which throws; with the helper added the same call returns.
This commit is contained in:
parent
7348a20497
commit
c70c1d2d89
1 changed files with 4 additions and 1 deletions
|
|
@ -1888,8 +1888,11 @@ jobs:
|
|||
# (step/substep -> Write-StudioStdoutMirror / Get-StudioAnsi).
|
||||
$script:StudioVtOk = $false
|
||||
$script:UnslothVerbose = $false
|
||||
# Get-HostMachineArch is reached only on the absent path, where
|
||||
# Test-VCRedistInstalled consults it before trusting the System32 DLL, so
|
||||
# part A passes without it and only the clean-box part fails.
|
||||
foreach ($fn in @('Get-StudioAnsi', 'Write-StudioStdoutMirror', 'step', 'substep',
|
||||
'Invoke-SetupCommand', 'Refresh-Environment',
|
||||
'Invoke-SetupCommand', 'Refresh-Environment', 'Get-HostMachineArch',
|
||||
'Test-VCRedistInstalled', 'Ensure-VCRedist')) {
|
||||
$src = Get-FunctionSource -Path $setup -Name $fn
|
||||
if (-not $src) { throw "Function '$fn' not found in setup.ps1" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue