Fix an external pod that downloaded the wrong content #11544
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Description
How to appear
Podfile: pod 'A', :git => 'ARepo'
;source = 'BRepo'
in the A.podspec file, andfile_patterns
will not match any filesThis causes an empty folder A to be created in the sandbox after the first pod install, but on the second pod install, the contents of BRepo will appear in folder A in the sandbox.
It is very puzzling that no changes were made between the two pod installs, but two different results are produced.
Reason
In the second pod install, because in the process of processing the external pod, only the existence of the folder is judged, but not whether there is no content, so it is considered that it does not belong to the pre-download; in the later dependency download process it is judged as the sandbox state of the release pod, and the contents of the podspec are used to re-download, which leads to the different results of the two installs.