8000 Work around broken Powershell 5.0+ · python/release-tools@8e53eb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e53eb4

Browse files
committed
Work around broken Powershell 5.0+
1 parent 2ce2d54 commit 8e53eb4

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

windows-release/test-msi.ps1

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,24 @@ dir -r "${env:APPDATA}\Microsoft\Windows\Start Menu\Programs\Python*"
2727

2828
Write-Host "##[section]Capture registry"
2929
Write-Host 'Capture per-machine 32-bit registry'
30-
Write-Host "##[command]dir -r ""HKLM:\Software\WOW6432Node\Python"""
31-
dir -r "HKLM:\Software\WOW6432Node\Python"
30+
# PS 5.0 and later can't do this, because they normalise registry paths incorrectly
31+
# So we'll use the good old "reg" tool
32+
#Write-Host "##[command]dir -r ""HKLM:\Software\WOW6432Node\Python"""
33+
#dir -r "HKLM:\Software\WOW6432Node\Python"
34+
Write-Host "##[command]reg HKLM\Software\Python /s /reg:32"
35+
reg HKLM\Software\Python /s /reg:32
3236

3337
Write-Host 'Capture per-machine native registry'
34-
Write-Host "##[command]dir -r ""HKLM:\Software\Python"""
35-
dir -r "HKLM:\Software\Python"
38+
#Write-Host "##[command]dir -r ""HKLM:\Software\Python"""
39+
#dir -r "HKLM:\Software\Python"
40+
Write-Host "##[command]reg HKLM\Software\Python /s /reg:64"
41+
reg HKLM\Software\Python /s /reg:64
3642

3743
Write-Host 'Capture current-user registry'
38-
Write-Host "##[command]dir -r ""HKCU:\Software\Python"""
39-
dir -r "HKCU:\Software\Python"
44+
#Write-Host "##[command]dir -r ""HKCU:\Software\Python"""
45+
#dir -r "HKCU:\Software\Python"
46+
Write-Host "##[command]reg HKCU\Software\Python /s"
47+
reg HKCU\Software\Python /s
4048

4149

4250
if (-not $env:SkipTests) {

0 commit comments

Comments
 (0)
0