snapshot/lib/snapshot/reset_simulators.rb in fastlane-2.61.0.beta.20171006010004 vs snapshot/lib/snapshot/reset_simulators.rb in fastlane-2.61.0.beta.20171007010004

- old
+ new

@@ -5,11 +5,11 @@ # !! Warning: This script will remove all your existing simulators !! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! sure = true if FastlaneCore::Env.truthy?("SNAPSHOT_FORCE_DELETE") || force begin - sure = UI.confirm("Are you sure? All your simulators will be DELETED and new ones will be created!") unless sure + sure = UI.confirm("Are you sure? All your simulators will be DELETED and new ones will be created! (You can use `SNAPSHOT_FORCE_DELETE` to skip this confirmation)") unless sure rescue => e UI.user_error!("Please make sure to pass the `--force` option to reset simulators when running in non-interactive mode") unless UI.interactive? raise e end @@ -64,10 +64,12 @@ end def self.create(device_type, os_versions, os_name = 'iOS') os_versions.each do |os_version| puts "Creating #{device_type[0]} for #{os_name} version #{os_version[0]}" - `xcrun simctl create '#{device_type[0]}' #{device_type[1]} #{os_version[1]}` + command = "xcrun simctl create '#{device_type[0]}' #{device_type[1]} #{os_version[1]}" + UI.command(command) if FastlaneCore::Globals.verbose? + `#{command}` end end def self.filter_runtimes(all_runtimes, os = 'iOS', versions = []) all_runtimes.select { |v, id| v[/^#{os}/] }.select { |v, id| v[/#{versions.join("|")}$/] }