SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.
MIT License
1.56k stars 238 forks source link

Error while slathering due to wrong xcode path #471

Closed dman-github closed 3 years ago

dman-github commented 3 years ago

I had an old version of xcode at /Applications/Xcode 9.4.1.app installed together with my main xcode at /Applications/Xcode.app. The old version I have just deleted. I ran the slather coverage command from my source directory but get the error below because it is referencing the old xcode path. How to I change this to the default /Application.Xcode.app path?

Slathering... Traceback (most recent call last): 15: from /Users/domini/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in <main>' 14: from /Users/domini/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:ineval' 13: from /Users/domini/.rvm/gems/ruby-2.5.1/bin/slather:23:in <main>' 12: from /Users/domini/.rvm/gems/ruby-2.5.1/bin/slather:23:inload' 11: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/slather-2.4.6/bin/slather:17:in <top (required)>' 10: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun' 9: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run' 8: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:inexecute' 7: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run' 6: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/slather-2.4.6/lib/slather/command/coverage_command.rb:47:inexecute' 5: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/slather-2.4.6/lib/slather/command/coverage_command.rb:135:in setup_input_format' 4: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/slather-2.4.6/lib/slather/project.rb:336:ininput_format=' 3: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/slather-2.4.6/lib/slather.rb:27:in xcode_version' 2: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/slather-2.4.6/lib/slather.rb:27:innew' 1: from /Users/domini/.rvm/gems/ruby-2.5.1/gems/CFPropertyList-2.3.6/lib/cfpropertylist/rbCFPropertyList.rb:254:in initialize' /Users/domini/.rvm/gems/ruby-2.5.1/gems/CFPropertyList-2.3.6/lib/cfpropertylist/rbCFPropertyList.rb:349:inload': File /Applications/Xcode 9.4.1.app/Contents/Developer/../Info.plist not readable! (IOError)

dman-github commented 3 years ago

solution to change the xcode path was sudo xcode-select -switch /Applications/Xcode.app This fixes the issue