Skip to content

Commit

Permalink
phx.new - Fix deprecation warning when using Elixir ~> 1.18 (#5940)
Browse files Browse the repository at this point in the history
  • Loading branch information
psantos10 authored and SteffenDE committed Feb 17, 2025
1 parent 668a973 commit a31aa15
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions installer/lib/mix/tasks/phx.new.ex
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,14 @@ defmodule Mix.Tasks.Phx.New do
Code.ensure_loaded?(Hex)
end

defp rebar_available? do
Mix.Rebar.rebar_cmd(:rebar3)
if Version.match?(System.version(), "~> 1.18") do
defp rebar_available? do
true
end
else
defp rebar_available? do
Mix.Rebar.rebar_cmd(:rebar3)
end
end

defp print_missing_steps(steps) do
Expand Down

0 comments on commit a31aa15

Please # to comment.