Skip to content

Commit 1662319

Browse files
author
José Valim
committed
Do not use erl_prim_loader as we no longer keep archives around
1 parent 6c1fe08 commit 1662319

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/mix/lib/mix/local.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ defmodule Mix.Local do
9595
"""
9696
def check_elixir_version_in_ebin(ebin) do
9797
elixir = ebin |> Path.dirname |> Path.join(".elixir") |> String.to_charlist
98-
case :erl_prim_loader.get_file(elixir) do
99-
{:ok, req, _} ->
98+
case File.read(elixir) do
99+
{:ok, req} ->
100100
unless Version.match?(System.version, req) do
101101
archive = ebin |> Path.dirname |> Path.basename
102102
Mix.shell.error "warning: the archive #{archive} requires Elixir #{inspect req} " <>
103103
"but you are running on v#{System.version}"
104104
end
105105
:ok
106-
:error ->
106+
{:error, _} ->
107107
:ok
108108
end
109109
end

lib/mix/lib/mix/task.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ defmodule Mix.Task do
7676
end
7777

7878
defp safe_list_dir(path) do
79-
case :erl_prim_loader.list_dir(path) do
79+
case File.ls(path) do
8080
{:ok, paths} -> paths
8181
{:error, _} -> []
8282
end

0 commit comments

Comments
 (0)