Skip to content

Commit

Permalink
logging on command search
Browse files Browse the repository at this point in the history
  • Loading branch information
ityonemo committed Aug 4, 2024
1 parent 5af5df9 commit a4b09c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/zig/command.ex
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,15 @@ defmodule Zig.Command do

cond do
path = find_from_env() ->
Logger.info("zig expected (via env variable) in #{path}")
path

path = find_in_basedir() ->
Logger.info("zig expected (via cache) in #{path}")
path

path = System.find_executable("zig") ->
Logger.info("system zig found in #{path}")
path

true ->
Expand All @@ -165,6 +168,9 @@ defmodule Zig.Command do
{os, arch} = os_info()

zig_executable = Path.join(path, "zig-#{os}-#{arch}-#{@default_version}/zig")

Logger.info("searching for zig in #{zig_executable}")

if File.exists?(zig_executable), do: zig_executable
end

Expand Down

0 comments on commit a4b09c7

Please sign in to comment.