Skip to content

Commit c49b8a6

Browse files
niheavenbrian6932
authored andcommitted
fix(scoop-info): Fix download size estimating (ScoopInstaller#5958)
1 parent 9f83963 commit c49b8a6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

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

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

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)