Obscure error during pod install

EDIT: it happens because of pod check command at the start of circle’s predefined Install Cocoapods step

I use gemfile with cocoapods 1.0.1

My circle config is:
machine: xcode: version: "7.3.1" dependencies: pre: - brew install graphicsmagick - script/bootstrap-if-needed cache_directories: - "Carthage" test: override: - make test

I’m getting strange error on pod install step:
cd “.”
export LC_CTYPE=“en_US.UTF-8”
pod check || bundle exec pod install

[!] Invalid Podfile file: undefined method `inherit!’ for #Pod::Podfile:0x007fdbe33f6b48. Updating CocoaPods might fix the issue.

from /Users/distiller/thor/Podfile:47


target ‘swiftGift2Tests’ do

 inherit! :search_paths

pod ‘Expecta’


Setting up CocoaPods master repo`

After it building continues, but I see
Setting up CocoaPods master repo Setup completed
in the logs and pod step takes around ~5 minutes which makes me think that cache does not really work.