Skip to content

Commit 17a14d2

Browse files
ethunkEric Hunkler
andauthored
Added debug log for install script output (#8)
Co-authored-by: Eric Hunkler <ehunkler@moveableink.com>
1 parent 242711e commit 17a14d2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/vector/installer.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,18 @@ defmodule Vector.Installer do
6363
install = String.replace(@install, "{path}", path)
6464
install = String.to_charlist(install)
6565
# credo:disable-for-next-line
66-
:os.cmd(install)
67-
validate!()
66+
debug_info = :os.cmd(install)
67+
validate!(debug_info)
6868
end
6969

70-
defp validate! do
70+
defp validate!(debug_info) do
7171
case Vector.version() do
7272
{:ok, version} ->
7373
Logger.debug("Vector #{version} installed.")
7474
:ok
7575

7676
:error ->
77+
IO.puts(debug_info)
7778
raise RuntimeError, "Vector binary failed to install."
7879
end
7980
end

0 commit comments

Comments
 (0)