github_packages: call ln with force

`FileUtils.cp` overwrites its destination when the destination already
exists, while `FileUtils.ln` throws `EEXIST`. To restore the old
behaviour, let's set `force: true`.

This fixes recent CI failures in Homebrew/core.[^1]

[^1]: For example: https://github.com/Homebrew/homebrew-core/actions/runs/5313853638/jobs/9620314048#step:8:158
This commit is contained in:
Carlo Cabrera 2023-06-19 23:57:16 +08:00
parent 83d4c63289
commit c03e4111e6
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -458,7 +458,7 @@ class GitHubPackages
def write_tar_gz(local_file, blobs) def write_tar_gz(local_file, blobs)
tar_gz_sha256 = Digest::SHA256.file(local_file) tar_gz_sha256 = Digest::SHA256.file(local_file)
.hexdigest .hexdigest
FileUtils.ln local_file, blobs/tar_gz_sha256 FileUtils.ln local_file, blobs/tar_gz_sha256, force: true
tar_gz_sha256 tar_gz_sha256
end end