Commit 8ee37c39 authored by Danielle Tomlinson's avatar Danielle Tomlinson Committed by GitHub

Merge pull request #6040 from UkuLoskit/fix_6032

Exit with non-zero exit status if pod repo update fails
parents 2221f4f3 c1fbc6d0
...@@ -16,6 +16,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -16,6 +16,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Danielle Tomlinson](https://github.com/dantoml) [Danielle Tomlinson](https://github.com/dantoml)
[#6042](https://github.com/CocoaPods/CocoaPods/pull/6042) [#6042](https://github.com/CocoaPods/CocoaPods/pull/6042)
* Exit with non-zero exit status if pod repo update fails
[Uku Loskit](https://github.com/UkuLoskit)
[#6037](https://github.com/CocoaPods/CocoaPods/issues/6037)
##### Bug Fixes ##### Bug Fixes
* None. * None.
......
...@@ -107,10 +107,10 @@ module Pod ...@@ -107,10 +107,10 @@ module Pod
git!(['-C', repo, 'pull', '--ff-only']) git!(['-C', repo, 'pull', '--ff-only'])
end end
rescue rescue
UI.warn 'CocoaPods was not able to update the ' \ raise Informative, 'CocoaPods was not able to update the ' \
"`#{name}` repo. If this is an unexpected issue " \ "`#{name}` repo. If this is an unexpected issue " \
'and persists you can inspect it running ' \ 'and persists you can inspect it running ' \
'`pod repo update --verbose`' '`pod repo update --verbose`'
end end
end end
......
...@@ -135,9 +135,8 @@ fatal: Could not read from remote repository. ...@@ -135,9 +135,8 @@ fatal: Could not read from remote repository.
Please make sure you have the correct access rights Please make sure you have the correct access rights
and the repository exists. and the repository exists.
EOS EOS
@sources_manager.expects(:update_search_index_if_needed_in_background).with({}).returns(nil) e = lambda { @sources_manager.update(test_repo_path.basename.to_s, true) }.should.raise Pod::Informative
@sources_manager.update(test_repo_path.basename.to_s, true) e.message.should.include('not able to update the `master` repo')
UI.warnings.should.include('not able to update the `master` repo')
end end
it 'informs the user if there is an update for CocoaPods' do it 'informs the user if there is an update for CocoaPods' do
......
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