Skip to content

Commit 7ff3e1f

Browse files
committed
Fix a bug in ~/.iex expansion
1 parent d6d6303 commit 7ff3e1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/iex/lib/iex/server.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ defmodule IEx.Server do
9191
# Locates and loads an .iex file from one of predefined locations. Returns
9292
# new config.
9393
defp load_dot_iex(config) do
94-
path = Enum.find [".iex", "~/.iex"], fn path -> File.regular?(Path.expand(path)) end
94+
candidates = Enum.map [".iex", "~/.iex"], Path.expand(&1)
95+
path = Enum.find candidates, fn path -> File.regular?(path) end
9596
if nil?(path) do
9697
config
9798
else

0 commit comments

Comments
 (0)