2 Commits

Author SHA1 Message Date
Hsiao-nan Cheung
222b253e3c Merge branch 'develop' into fix-path 2025-10-15 10:35:01 +08:00
z-Fng
20a178b1f3 fix(checkver): Allow script to run when URL fetch fails but script exists (#6490) 2025-10-13 17:32:26 +08:00
2 changed files with 9 additions and 3 deletions

View File

@@ -15,6 +15,7 @@
- **scoop-version:** Fix logic error caused by missing brackets ([#6463](https://github.com/ScoopInstaller/Scoop/issues/6463))
- **core|manifest:** Avoid error messages when searching non-existent 'deprecated' directory ([#6471](https://github.com/ScoopInstaller/Scoop/issues/6471))
- **path:** Trim ending slash when initializing paths ([#6501](https://github.com/ScoopInstaller/Scoop/issues/6501))
- **checkver:** Allow script to run when URL fetch fails but script exists ([#6490](https://github.com/ScoopInstaller/Scoop/issues/6490))
### Code Refactoring

View File

@@ -281,11 +281,16 @@ while ($in_progress -gt 0) {
}
$err = $ev.SourceEventArgs.Error
if ($err) {
next "$($err.message)`r`nURL $url is not valid"
continue
if (!$script) {
next "$($err.message)`r`nURL $url is not valid"
continue
} else {
# Run script despite URL download failure
Write-Host "$($err.message)`r`nURL $url is not valid. Falling back to checkver.script ..."
}
}
if ($url) {
if ($url -and !$err) {
$ms = New-Object System.IO.MemoryStream
$ms.Write($result, 0, $result.Length)
$ms.Seek(0, 0) | Out-Null