Skip to content

Commit b710ff6

Browse files
authored
fix(scoop-info): Fix download size estimating (#5958)
1 parent 1dd479f commit b710ff6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- **system:** Fix argument passing to `Split-PathLikeEnvVar()` in deprecated `strip_path()` ([#5937](https://github.com/ScoopInstaller/Scoop/issues/5937))
1414
- **scoop-cache:** Fix regression in 36026f18 ([#5944](https://github.com/ScoopInstaller/Scoop/issues/5944))
1515
- **core:** Fix "Invoke-ExternalCommand" quoting rules ([#5945](https://github.com/ScoopInstaller/Scoop/issues/5945))
16+
- **scoop-info:** Fix download size estimating ([#5958](https://github.com/ScoopInstaller/Scoop/issues/5958))
1617

1718
## [v0.4.1](https://github.com/ScoopInstaller/Scoop/compare/v0.4.0...v0.4.1) - 2024-04-25
1819

libexec/scoop-info.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ if ($status.installed) {
166166
$cached = $null
167167
}
168168

169-
[int]$urlLength = (Invoke-WebRequest $url -Method Head).Headers.'Content-Length'[0]
169+
$urlLength = (Invoke-WebRequest $url -Method Head).Headers.'Content-Length' | ForEach-Object { [int]$_ }
170170
$totalPackage += $urlLength
171171
} catch [System.Management.Automation.RuntimeException] {
172172
$totalPackage = 0

0 commit comments

Comments
 (0)