Mix: Swallow git error messages during version number handling.
authorlain <lain@soykaf.club>
Tue, 4 Jun 2019 14:44:56 +0000 (16:44 +0200)
committerlain <lain@soykaf.club>
Tue, 4 Jun 2019 14:58:40 +0000 (16:58 +0200)
Otherwise sometimes a 'fatal' message will be printed, confusing users.

mix.exs

diff --git a/mix.exs b/mix.exs
index df1a7ced44643f77795b9509dce787921d16115d..9447a2e4f955ae6f06d614d9901fe7ee27ebf58c 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -157,7 +157,8 @@ defmodule Pleroma.Mixfile do
   #   * the mix environment if different than prod
   defp version(version) do
     {git_tag, git_pre_release} =
-      with {tag, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=0"]),
+      with {tag, 0} <-
+             System.cmd("git", ["describe", "--tags", "--abbrev=0"], stderr_to_stdout: true),
            tag = String.trim(tag),
            {describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]),
            describe = String.trim(describe),