python@3.10.4: Modify installer

This avoids the problem in #489 preemptively
This commit is contained in:
Issac Lin 2022-05-05 20:06:34 +08:00 committed by GitHub
parent 2ecc74acc1
commit 0889cc5352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,11 @@
"@('path.msi', 'pip.msi') | ForEach-Object {", "@('path.msi', 'pip.msi') | ForEach-Object {",
" Remove-Item \"$dir\\_tmp\\AttachedContainer\\$_\"", " Remove-Item \"$dir\\_tmp\\AttachedContainer\\$_\"",
"}", "}",
"(Get-ChildItem \"$dir\\_tmp\\AttachedContainer\\*.msi\").FullName | ForEach-Object { Expand-MsiArchive $_ \"$dir\" }", "(Get-ChildItem \"$dir\\_tmp\\AttachedContainer\\*.msi\").FullName | ForEach-Object {",
" # appendpath.msi does not contain any file, which causes lessmsi extraction to fail",
" if($((Get-Item $_).Basename) -eq 'appendpath') { return }",
" Expand-MsiArchive $_ \"$dir\" ",
"}",
"Remove-Item \"$dir\\_tmp\", \"$dir\\setup.exe\" -Force -Recurse", "Remove-Item \"$dir\\_tmp\", \"$dir\\setup.exe\" -Force -Recurse",
"if ($global) {", "if ($global) {",
" $pathext = (env 'PATHEXT' $true) -replace ';.PYW?', ''", " $pathext = (env 'PATHEXT' $true) -replace ';.PYW?', ''",