diff --git a/utils/build.ps1 b/utils/build.ps1 index 0318f6aaf374..ebad9693b7c9 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -1370,7 +1370,7 @@ function Get-Dependencies { if ($EnableCaching) { $SCCache = Get-SCCache - $FileExtension = if ($SCCache.URL -match '/[^/]+(\..+)$') { $Matches[1] } else { + $FileExtension = if ($SCCache.URL -match '\.(?:tar\.gz|zip)$') { $Matches[0] } else { throw "Invalid sccache URL" } DownloadAndVerify $SCCache.URL "$BinaryCache\sccache-$SCCacheVersion$FileExtension" $SCCache.SHA256