lib/calabash-cucumber/launch/simulator_helper.rb in calabash-cucumber-0.9.39 vs lib/calabash-cucumber/launch/simulator_helper.rb in calabash-cucumber-0.9.40
- old
+ new
@@ -59,21 +59,15 @@
def self.project_dir
File.expand_path(ENV['PROJECT_DIR'] || Dir.pwd)
end
def self.app_bundle_or_raise(path)
- dd_dir = derived_data_dir_for_project
- app_bundles = Dir.glob(File.join(dd_dir, "Build", "Products", "*", "*.app"))
bundle_path = nil
if path and not File.directory?(path)
- puts "Unable to find .app bundle at #{path}"
- if dd_dir.nil?
- raise "Unable to find Project for #{project_dir} in #{%x[ls #{DEFAULT_DERIVED_DATA}]}"
- end
- if app_bundles.empty?
- raise "Can't find build in #{dd_dir}/Build/Products/*/*.app'. Have you built your app for simulator?"
- end
+ puts "Unable to find .app bundle at #{path}. It should be an .app directory."
+ dd_dir = derived_data_dir_for_project
+ app_bundles = Dir.glob(File.join(dd_dir, "Build", "Products", "*", "*.app"))
msg = "Try setting APP_BUNDLE_PATH in features/support/launch.rb to one of:\n\n"
msg << app_bundles.join("\n")
raise msg
elsif path
bundle_path = path