Move explicit exit out of display function
This commit is contained in:
@@ -56,7 +56,6 @@ defmodule Display do
|
|||||||
def congratulate do
|
def congratulate do
|
||||||
format_green("\nYou have learned much. You must find your own path now.")
|
format_green("\nYou have learned much. You must find your own path now.")
|
||||||
|> IO.puts
|
|> IO.puts
|
||||||
exit(:normal)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear_screen do
|
def clear_screen do
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ defmodule Mix.Tasks.Meditate do
|
|||||||
|> Tracker.start
|
|> Tracker.start
|
||||||
|> Runner.run
|
|> Runner.run
|
||||||
|
|
||||||
if Tracker.complete?, do: Display.congratulate
|
if Tracker.complete? do
|
||||||
|
Display.congratulate
|
||||||
|
exit(:normal)
|
||||||
|
end
|
||||||
|
|
||||||
receive do
|
receive do
|
||||||
{:DOWN, _references, :process, ^watcher, _reason} -> nil
|
{:DOWN, _references, :process, ^watcher, _reason} -> nil
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ defmodule Watcher do
|
|||||||
e -> Display.show_compile_error(e)
|
e -> Display.show_compile_error(e)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Tracker.complete?, do: Display.congratulate
|
if Tracker.complete? do
|
||||||
|
Display.congratulate
|
||||||
|
exit(:normal)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user