From 277fff6d962aca413e38c3eab0c3f53fd4872ab8 Mon Sep 17 00:00:00 2001 From: Justin Martin Date: Fri, 24 Nov 2023 16:49:56 -0800 Subject: [PATCH] Don't use :remove_destination option to `FileUtils.cp_r` --- CHANGELOG.md | 4 ++++ lib/cocoapods/downloader.rb | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f71eb6eb..6472b9ca20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` [Justin Martin](https://github.com/justinseanmartin) [#11640](https://github.com/CocoaPods/CocoaPods/issues/11640) +* Don't use the `remove_destination` parameter in FileUtils.cp_r + [Justin Martin](https://github.com/justinseanmartin) + [#12165](https://github.com/CocoaPods/CocoaPods/pull/12165) + ## 1.14.3 (2023-11-19) ##### Enhancements diff --git a/lib/cocoapods/downloader.rb b/lib/cocoapods/downloader.rb index b6892b20e3..de97a7b09b 100644 --- a/lib/cocoapods/downloader.rb +++ b/lib/cocoapods/downloader.rb @@ -51,7 +51,8 @@ def self.download( if target && result.location && target != result.location UI.message "Copying #{request.name} from `#{result.location}` to #{UI.path target}", '> ' do Cache.read_lock(result.location) do - FileUtils.cp_r(result.location, target, :remove_destination => true) + FileUtils.rm_rf(target) + FileUtils.cp_r(result.location, target) end end end