Skip to content

Commit a31aa15

Browse files
psantos10SteffenDE
authored andcommitted
phx.new - Fix deprecation warning when using Elixir ~> 1.18 (#5940)
1 parent 668a973 commit a31aa15

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

installer/lib/mix/tasks/phx.new.ex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,14 @@ defmodule Mix.Tasks.Phx.New do
268268
Code.ensure_loaded?(Hex)
269269
end
270270

271-
defp rebar_available? do
272-
Mix.Rebar.rebar_cmd(:rebar3)
271+
if Version.match?(System.version(), "~> 1.18") do
272+
defp rebar_available? do
273+
true
274+
end
275+
else
276+
defp rebar_available? do
277+
Mix.Rebar.rebar_cmd(:rebar3)
278+
end
273279
end
274280

275281
defp print_missing_steps(steps) do

0 commit comments

Comments
 (0)