From 7f80ad382527abf8a62b1960880ca7b32c30cd19 Mon Sep 17 00:00:00 2001 From: dvic Date: Sun, 21 Jul 2024 08:44:39 +0200 Subject: [PATCH] Fix env when running retry --- lib/ex_check/check/compiler.ex | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ex_check/check/compiler.ex b/lib/ex_check/check/compiler.ex index 14ebedb..f629ed7 100644 --- a/lib/ex_check/check/compiler.ex +++ b/lib/ex_check/check/compiler.ex @@ -11,12 +11,11 @@ defmodule ExCheck.Check.Compiler do end defp process_compiler(tools, opts) do - compiler = List.keyfind(tools, :compiler, 0) || raise("compiler tool definition missing") - compiler = prepare(compiler, opts) + {:compiler, tool_opts} = List.keyfind(tools, :compiler, 0) || raise("compiler tool definition missing") - case compiler do - {:pending, _} -> compiler - _ -> {:pending, {:compiler, ["mix", "compile"], []}} + case prepare({:compiler, tool_opts}, opts) do + {:pending, _} = result -> result + _ -> {:pending, {:compiler, ["mix", "compile"], [env: Keyword.get(tool_opts, :env, %{})]}} end end