Skip to content

Fix .iex.exs error behaviour #8618 #8619

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

Merged
merged 5 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/iex/lib/iex/evaluator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ defmodule IEx.Evaluator do
kind, error ->
io_result("Error while evaluating: #{path}")
print_error(kind, error, __STACKTRACE__)
System.halt(1)
state
end
end

Expand Down
9 changes: 9 additions & 0 deletions lib/iex/test/iex/interaction_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,14 @@ defmodule IEx.InteractionTest do
File.rm("dot-iex-1")
File.rm("dot-iex")
end

test "malformed .iex" do
File.write!("dot-iex", "malformed")

assert capture_iex("1 + 2", [], dot_iex_path: "dot-iex") =~
"** (CompileError) dot-iex:1: undefined function malformed/0"
after
File.rm("dot-iex")
end
end
end