Browse Source

Add support for rebar deps that don't specify hash

Here's an example of such a dependency in the wild: (rebar indeed supports it)
https://github.com/processone/cache_tab/blob/master/rebar.config#L3
Rudi Grinberg 10 years ago
parent
commit
3999302bbf
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/mad_deps.erl

+ 3 - 1
src/mad_deps.erl

@@ -20,7 +20,9 @@ fetch(Cwd, Config, ConfigFile, [H|T]) ->
                          V={_, _, _} ->
                          V={_, _, _} ->
                              V;
                              V;
                          {_Cmd, _Url, _Co, _} ->
                          {_Cmd, _Url, _Co, _} ->
-                             {_Cmd, _Url, _Co}
+                             {_Cmd, _Url, _Co};
+                         {_Cmd, _Url} ->
+                             {_Cmd, _Url, "master"}
                      end,
                      end,
     Cmd1 = atom_to_list(Cmd),
     Cmd1 = atom_to_list(Cmd),
     Cache = mad_utils:get_value(cache, Config, deps_fetch),
     Cache = mad_utils:get_value(cache, Config, deps_fetch),