Move explicit exit out of display function

This commit is contained in:
Jay Hayes
2016-04-26 18:10:16 -05:00
parent 9b65177e17
commit 93c41d6ced
3 changed files with 8 additions and 3 deletions

View File

@@ -56,7 +56,6 @@ defmodule Display do
def congratulate do
format_green("\nYou have learned much. You must find your own path now.")
|> IO.puts
exit(:normal)
end
def clear_screen do

View File

@@ -16,7 +16,10 @@ defmodule Mix.Tasks.Meditate do
|> Tracker.start
|> Runner.run
if Tracker.complete?, do: Display.congratulate
if Tracker.complete? do
Display.congratulate
exit(:normal)
end
receive do
{:DOWN, _references, :process, ^watcher, _reason} -> nil

View File

@@ -13,7 +13,10 @@ defmodule Watcher do
e -> Display.show_compile_error(e)
end
if Tracker.complete?, do: Display.congratulate
if Tracker.complete? do
Display.congratulate
exit(:normal)
end
end
end
end