diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e63d4be9..d3ba1722c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ##### Bug Fixes -* None. - +* Fix issue when git's `core.fsmonitor` feature is enabled + [Justin Martin](https://github.com/justinseanmartin) + [#11640](https://github.com/CocoaPods/CocoaPods/issues/11640) ## 1.14.3 (2023-11-19) diff --git a/lib/cocoapods/downloader/cache.rb b/lib/cocoapods/downloader/cache.rb index 5c9ff20fc7..ebb498df6a 100644 --- a/lib/cocoapods/downloader/cache.rb +++ b/lib/cocoapods/downloader/cache.rb @@ -308,7 +308,7 @@ def copy_source_and_clean(source, destination, spec) specs_by_platform = group_subspecs_by_platform([spec]) destination.parent.mkpath Cache.write_lock(destination) do - FileUtils.cp_r(source, destination, :remove_destination => true) + Pod::Executable.execute_command('rsync', ['-a', '--exclude=.git/fsmonitor--daemon.ipc', '--delete', "#{source}/", destination]) Pod::Installer::PodSourcePreparer.new(spec, destination).prepare! Sandbox::PodDirCleaner.new(destination, specs_by_platform).clean! end