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

CLI: simctl doctor erases sims first #421

Merged
merged 1 commit into from
Mar 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/run_loop/cli/simctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,25 @@ def doctor
debug = options[:debug]
device = options[:device]

manage_processes

if device
RunLoop::Environment.with_debugging(debug) do
RunLoop::CoreSimulator.erase(device)
launch_simulator(device, xcode)
end
else
launch_each_simulator
RunLoop::Environment.with_debugging(debug) do
erase_and_launch_each_simulator
end
end

manage_processes
end

no_commands do
def launch_each_simulator
def erase_and_launch_each_simulator
sim_control.simulators.each do |simulator|
RunLoop::CoreSimulator.erase(simulator)
launch_simulator(simulator, xcode)
end
end
Expand Down