We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
OpenPackage.Source.Url
1 parent 6e9f998 commit d2ecfbfCopy full SHA for d2ecfbf
1 file changed
OP.types.ps1xml
@@ -7812,10 +7812,10 @@ foreach ($uri in $url) {
7812
# If the web response is a byte array
7813
if ($WebResponse.Content -is [byte[]] -and
7814
# and starts with the magic pair of bytes indicate it might be a zip
7815
- ($WebResponse.Content[0] -eq 80 -and $WebResponse.Content[-1] -eq 75)
+ ($WebResponse.Content[0] -eq 80 -and $WebResponse.Content[1] -eq 75)
7816
) {
7817
# Create a stream from the response
7818
- $memoryStream = [IO.MemoryStream]::new($downloadPackage.Content)
+ $memoryStream = [IO.MemoryStream]::new($WebResponse.Content)
7819
# and open the package
7820
$currentPackage = [IO.Packaging.Package]::Open($memoryStream, 'OpenOrCreate', 'ReadWrite')
7821
# If that did not work, it will error,
0 commit comments