Skip to content

Commit

Permalink
Use rsync to exclude copying the fsmonitor--daemon.ipc
Browse files Browse the repository at this point in the history
This prevents a copy error where the system is unable to copy the ipc
file due to being a socket. This would otherwise manifest as errors
during pod install with the message "too long unix socket path" if git's
`core.fsmonitor` feature is enabled.

Resolves #11640
  • Loading branch information
justinseanmartin committed Nov 22, 2023
1 parent 7a4e6a2 commit 8fd4239
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Expand Up @@ -14,8 +14,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`

##### Bug Fixes

* None.

* 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)

## 1.14.3 (2023-11-19)

Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/downloader/cache.rb
Expand Up @@ -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
Expand Down

0 comments on commit 8fd4239

Please sign in to comment.