diff --git a/CHANGELOG.md b/CHANGELOG.md index 68f4474059..f3cc670c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - **system:** Fix argument passing to `Split-PathLikeEnvVar()` in deprecated `strip_path()` ([#5937](https://github.com/ScoopInstaller/Scoop/issues/5937)) - **scoop-cache:** Fix regression in 36026f18 ([#5944](https://github.com/ScoopInstaller/Scoop/issues/5944)) - **core:** Fix "Invoke-ExternalCommand" quoting rules ([#5945](https://github.com/ScoopInstaller/Scoop/issues/5945)) +- **scoop-info:** Fix download size estimating ([#5958](https://github.com/ScoopInstaller/Scoop/issues/5958)) ## [v0.4.1](https://github.com/ScoopInstaller/Scoop/compare/v0.4.0...v0.4.1) - 2024-04-25 diff --git a/libexec/scoop-info.ps1 b/libexec/scoop-info.ps1 index 853de647f9..b7cf7cdeb0 100644 --- a/libexec/scoop-info.ps1 +++ b/libexec/scoop-info.ps1 @@ -166,7 +166,7 @@ if ($status.installed) { $cached = $null } - [int]$urlLength = (Invoke-WebRequest $url -Method Head).Headers.'Content-Length'[0] + $urlLength = (Invoke-WebRequest $url -Method Head).Headers.'Content-Length' | ForEach-Object { [int]$_ } $totalPackage += $urlLength } catch [System.Management.Automation.RuntimeException] { $totalPackage = 0