Commit 5955c55f authored by Samuel E. Giddins's avatar Samuel E. Giddins

[FileAccessor] Handle when a vendored framework has no headers directory

Closes https://github.com/CocoaPods/CocoaPods/issues/3967.
parent d51dab44
...@@ -4,6 +4,16 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -4,6 +4,16 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
To install release candidates run `[sudo] gem install cocoapods --pre` To install release candidates run `[sudo] gem install cocoapods --pre`
## Master
##### Bug Fixes
* Using vendored frameworks without a `Headers` directory will no longer cause a
crash.
[Samuel Giddins](https://github.com/segiddins)
[#3967](https://github.com/CocoaPods/CocoaPods/issues/3967)
## 0.39.0.beta.3 (2015-08-28) ## 0.39.0.beta.3 (2015-08-28)
##### Bug Fixes ##### Bug Fixes
......
...@@ -174,7 +174,8 @@ module Pod ...@@ -174,7 +174,8 @@ module Pod
# vendored framework. # vendored framework.
# #
def self.vendored_frameworks_headers_dir(framework) def self.vendored_frameworks_headers_dir(framework)
(framework + 'Headers').realpath dir = framework + 'Headers'
dir.directory? ? dir.realpath : dir
end end
# @param [Pathname] framework # @param [Pathname] framework
......
...@@ -140,6 +140,11 @@ module Pod ...@@ -140,6 +140,11 @@ module Pod
] ]
end end
it 'handles when the framework headers directory does not exist' do
Pathname.any_instance.stubs(:directory?).returns(false)
FileAccessor.vendored_frameworks_headers_dir(@root + 'Bananalib.framework').should == @root + 'Bananalib.framework/Headers'
end
it 'returns the paths of the library files' do it 'returns the paths of the library files' do
@accessor.vendored_libraries.should.include?(@root + 'libBananalib.a') @accessor.vendored_libraries.should.include?(@root + 'libBananalib.a')
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment