diff --git a/CHANGELOG.md b/CHANGELOG.md index a8b81b830d..580585eb8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Bug Fixes - **decompress:** Use PS's default 'Expand-Archive()' ([#5185](/~https://github.com/ScoopInstaller/Scoop/issues/5185)) +- **hash:** Fix SourceForge's hash extraction ([#5189](/~https://github.com/ScoopInstaller/Scoop/issues/5189)) ### Code Refactoring diff --git a/lib/autoupdate.ps1 b/lib/autoupdate.ps1 index bed8175e94..6edc8791ff 100644 --- a/lib/autoupdate.ps1 +++ b/lib/autoupdate.ps1 @@ -248,7 +248,7 @@ function get_hash_for_app([String] $app, $config, [String] $version, [String] $u 'sourceforge' { # change the URL because downloads.sourceforge.net doesn't have checksums $hashfile_url = (strip_filename (strip_fragment "https://sourceforge.net/projects/$($matches['project'])/files/$($matches['file'])")).TrimEnd('/') - $hash = find_hash_in_textfile $hashfile_url $substitutions '"$basename":.*?"sha1":\s"([a-fA-F0-9]{40})"' + $hash = find_hash_in_textfile $hashfile_url $substitutions '"$basename":.*?"sha1":\s*"([a-fA-F0-9]{40})"' } }