Skip to content

Commit 1235bd3

Browse files
authored
Return current nif version from download_or_reuse_nif (#82)
1 parent e5305fd commit 1235bd3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/elixir_make/artefact.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ defmodule ElixirMake.Artefact do
251251

252252
case List.keyfind(available_urls, target_at_nif_version, 0) do
253253
{^target_at_nif_version, download_url} ->
254-
{:ok, current_target, download_url}
254+
{:ok, current_target, nif_version_to_use, download_url}
255255

256256
nil ->
257257
available_targets = Enum.map(available_urls, fn {target, _url} -> target end)

lib/mix/tasks/compile.elixir_make.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ defmodule Mix.Tasks.Compile.ElixirMake do
213213
nif_version = "#{:erlang.system_info(:nif_version)}"
214214

215215
case Artefact.current_target_url(config, precompiler, nif_version) do
216-
{:ok, target, url} ->
217-
archived_fullpath = Artefact.archive_path(config, target, nif_version)
216+
{:ok, target, nif_version_to_use, url} ->
217+
archived_fullpath = Artefact.archive_path(config, target, nif_version_to_use)
218218

219219
unless File.exists?(archived_fullpath) do
220220
Mix.shell().info("Downloading precompiled NIF to #{archived_fullpath}")

0 commit comments

Comments
 (0)