From c03e4111e6ada35302362281b721276efd15726e Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 19 Jun 2023 23:57:16 +0800 Subject: [PATCH] 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 --- Library/Homebrew/github_packages.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index 8c111ab57f..d64209fe33 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -458,7 +458,7 @@ class GitHubPackages def write_tar_gz(local_file, blobs) tar_gz_sha256 = Digest::SHA256.file(local_file) .hexdigest - FileUtils.ln local_file, blobs/tar_gz_sha256 + FileUtils.ln local_file, blobs/tar_gz_sha256, force: true tar_gz_sha256 end