Commit 7dfa9eff authored by Kyle Fuller's avatar Kyle Fuller

[Lib lint] Fixes a crash when podspec cannot be loaded

Fixes #2147
parent 72760d91
......@@ -2,6 +2,16 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
##### Bug Fixes
* Fixes an issue where `pod lib lint` would crash if a podspec couldn't be
loaded.
[Kyle Fuller](https://github.com/kylef)
[#2147](https://github.com/CocoaPods/CocoaPods/issues/2147)
## 0.34.0.rc1
##### Breaking
......
......@@ -150,7 +150,10 @@ module Pod
if validator.validated?
UI.puts "#{validator.spec.name} passed validation.".green
else
message = "#{validator.spec.name} did not pass validation."
spec_name = podspec
spec_name = validator.spec.name if validator.spec
message = "#{spec_name} did not pass validation."
if @clean
message << "\nYou can use the `--no-clean` option to inspect " \
'any issue.'
......
......@@ -108,5 +108,14 @@ module Pod
UI.output.should.include 'Pods project available at'
end
end
it 'fails to lint if the spec is not loaded' do
Dir.chdir(temporary_directory) do
should.raise Pod::Informative do
run_command('lib', 'lint', '404.podspec')
end
UI.output.should.include 'could not be loaded'
end
end
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