Skip to content

Commit

Permalink
match on version struct
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenDE committed Dec 11, 2024
1 parent f55be53 commit f110ff0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion installer/lib/mix/tasks/phx.new.ex
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,12 @@ defmodule Mix.Tasks.Phx.New do

if version_task do
try do
latest_version = Task.await(version_task, 3_000)
# if we get anything else than a `Version`, we'll get a MatchError
# and fail silently
%Version{} = latest_version = Task.await(version_task, 3_000)
maybe_warn_outdated(latest_version)
rescue
_ -> :ok
catch
:exit, _ -> :ok
end
Expand Down

0 comments on commit f110ff0

Please sign in to comment.