Skip to content

Conversation

@charles-zablit
Copy link
Contributor

@charles-zablit charles-zablit commented Dec 19, 2025

This patch fixes the regular expression used to determine the extension of the sccache archive.

This is a follow up to #86109.

@charles-zablit charles-zablit self-assigned this Dec 19, 2025
@charles-zablit charles-zablit added the Windows Platform: Windows label Dec 19, 2025
@charles-zablit
Copy link
Contributor Author

@swift-ci please smoke test

@charles-zablit
Copy link
Contributor Author

I'm not sure why #86109 worked in my testings when I tried it at desk. The archive was .tar.gz and the script worked fine.

@charles-zablit
Copy link
Contributor Author

@swift-ci please smoke test

if ($EnableCaching) {
$SCCache = Get-SCCache
$FileExtension = if ($SCCache.URL -match '/[^/]+(\..+)$') { $Matches[1] } else {
$FileExtension = if ($SCCache.URL -match '\.(?:tar\.gz|zip)$') { $Matches[0] } else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems overly constraining. Why not support tar.xz? tzx is also a common extension for gzip'ed tarballs. The original RegEx would've/should've permitted that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Windows Platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants