fix(autoupdate): Check hash file before use GitHub SHA256 (#6435)

This commit is contained in:
Hsiao-nan Cheung
2025-08-12 14:36:30 +08:00
committed by GitHub
parent ed6101a2ab
commit 8c51a50856
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
### Features
**autoupdate:** GitHub predefined hashes support ([#6416](https://github.com/ScoopInstaller/Scoop/issues/6416))
**autoupdate:** GitHub predefined hashes support ([#6416](https://github.com/ScoopInstaller/Scoop/issues/6416), [#6435](https://github.com/ScoopInstaller/Scoop/issues/6435))
### Bug Fixes

View File

@@ -264,7 +264,7 @@ function get_hash_for_app([String] $app, $config, [String] $version, [String] $u
$hashmode = 'sourceforge'
}
if ($url -match 'https:\/\/github\.com\/(?<owner>[^\/]+)\/(?<repo>[^\/]+)\/releases\/download\/[^\/]+\/[^\/]+') {
if (!$hashfile_url -and $url -match 'https:\/\/github\.com\/(?<owner>[^\/]+)\/(?<repo>[^\/]+)\/releases\/download\/[^\/]+\/[^\/]+') {
$hashmode = 'github'
}