Skip to content

Commit dbab272

Browse files
Update Mix.Local.path_for/1 to Mix.path_for/1
This fixes a deprecation warning in elixir >= 1.10.0-rc.0
1 parent 9eab46d commit dbab272

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mix.exs

+5-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ defmodule Nerves.Bootstrap.Mixfile do
9292
end
9393

9494
defp archives_path do
95-
if function_exported?(Mix.Local, :path_for, 1),
96-
do: Mix.Local.path_for(:archive),
97-
else: Mix.Local.archives_path()
95+
cond do
96+
function_exported?(Mix, :path_for, 1) -> apply(Mix, :path_for, [:archives])
97+
function_exported?(Mix.Local, :path_for, 1) -> apply(Mix.Local, :path_for, [:archive])
98+
true -> Mix.Local.archives_path()
99+
end
98100
end
99101

100102
defp archive_ebin(archive) do

0 commit comments

Comments
 (0)