Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVELOPER_DIR shell variable seems to not be respected in Cocoapods 1.0.1 #3

Closed
maschall opened this issue Jun 25, 2016 · 4 comments
Closed

Comments

@maschall
Copy link

maschall commented Jun 25, 2016

I am doing the following in our CI build DEVELOPER_DIR=/Applications/Xcode6.4.app build_script.sh

The script runs a pod repo push --allow-warnings --use-libraries --verbose

In CocoaPods 0.37.1 we never had issues.

We are now getting an error

  • ERROR | [iOS] unknown: Encountered an unknown error (/Applications/Xcode7.2.app/Contents/Developer/usr/bin/xcrun simctl list devices

xcrun: error: unable to find Xcode installation from active developer path "/Applications/Xcode7.2.app", use xcode-select to change

/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/executable.rb:101:in execute_command' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/executable.rb:58:inblock in executable'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/simctl.rb:16:in simctl!' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/simctl.rb:10:inlist'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/find.rb:72:in usable_simulators' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/find.rb:64:insimulator'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/fourflusher-0.3.2/lib/fourflusher/xcodebuild.rb:7:in destination' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:717:inxcodebuild'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:478:in block in build_pod' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:141:inmessage'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:477:in build_pod' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:274:inblock in perform_extensive_analysis'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:263:in each' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:263:inperform_extensive_analysis'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:81:in validate' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:125:inblock in validate_podspec_files'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in each' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:invalidate_podspec_files'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:64:in run' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/claide-1.0.0/lib/claide/command.rb:334:inrun'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in run' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/gems/cocoapods-1.0.1/bin/pod:55:in<top (required)>'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/bin/pod:23:in load' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/bin/pod:23:in

'
/Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/bin/ruby_executable_hooks:15:in eval' /Users/jenkins/.rvm/gems/ruby-2.2.1@omnibus/bin/ruby_executable_hooks:15:in'
) during validation.

The command is failing in fourflusher, but if you run DEVELOPER_DIR=/Applications/Xcode6.4.app xcrun simctl list devices you will get a list of devices back.

If I change it to DEVELOPER_DIR=/Applications/Xcode6.4.app/Contents/Developer we no longer get this failure, however the other format is valid and should be respected

@neonichu
Copy link
Member

Interesting, I suspect that the way commands are executed by fourflusher, they'll only inherit exported environment variables.

Could you try:

export DEVELOPER_DIR=/Applications/Xcode6.4.app
build_script.sh

and see if that changes the result?

@maschall
Copy link
Author

I had tried

DEVELOPER_DIR="/Applications/Xcode6.4.app" ruby -e "require 'fourflusher'; puts Fourflusher::SimControl.new.destination('iPhone 4s', '8.0')"

which works as expected, but I will try with the export and get back.

@lemonkey
Copy link

Thanks for this. It could the clue I needed for the issue with Jenkins that I'm seeing.

@dnkoutso
Copy link
Contributor

dnkoutso commented Jun 5, 2019

Closing as too old issue.

@dnkoutso dnkoutso closed this as completed Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants