From 9af67e74abc371cb54e56219d09271f559610b57 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 | 6 +++++- lib/cocoapods/downloader.rb | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f71eb6eb..3bc21f4822 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,10 +14,14 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ##### Bug Fixes -* Fix pod install issue when git's `core.fsmonitor` feature is enabled +* Fix pod install issue when git's `core.fsmonitor` feature is enabled [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