Skip to content

Commit 08d588d

Browse files
committed
Continue parsing after --no-pry, closes #12072
1 parent 42ecc84 commit 08d588d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/elixir/lib/kernel/cli.ex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,17 +409,15 @@ defmodule Kernel.CLI do
409409
{config, t}
410410
end
411411

412+
defp parse_iex(["-S", h | t], config) do
413+
{%{config | commands: [{:script, h} | config.commands]}, t}
414+
end
415+
412416
# These clauses are here so that Kernel.CLI does not error out with "unknown option"
413417
defp parse_iex(["--dot-iex", _ | t], config), do: parse_iex(t, config)
414418
defp parse_iex(["--remsh", _ | t], config), do: parse_iex(t, config)
415419

416-
defp parse_iex(["--no-pry" | t], config) do
417-
{%{config | pry: false}, t}
418-
end
419-
420-
defp parse_iex(["-S", h | t], config) do
421-
{%{config | commands: [{:script, h} | config.commands]}, t}
422-
end
420+
defp parse_iex(["--no-pry" | t], config), do: parse_iex(t, %{config | pry: false})
423421

424422
defp parse_iex([h | t] = list, config) do
425423
case h do

0 commit comments

Comments
 (0)