summaryrefslogtreecommitdiff
path: root/src/rebar_utils.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-11-30 21:12:02 -0600
committerTristan Sloughter <t@crashfast.com>2014-11-30 21:12:02 -0600
commit5673fe035da48d48d0824bf7260bfda28c55c9d5 (patch)
tree1562523264f5da72ccee6eb4624afca8aa69f7cb /src/rebar_utils.erl
parentc4ee53c8bc8170a9340c540c341ad403c91c0218 (diff)
fixes for dialyzer findings
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r--src/rebar_utils.erl26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index c84dcf2..a6c9162 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -528,31 +528,7 @@ vcs_vsn_1(Vcs, Dir) ->
unknown ->
?ABORT("vcs_vsn: Unknown vsn format: ~p\n", [Vcs]);
{error, Reason} ->
- ?ABORT("vcs_vsn: ~s\n", [Reason]);
- Cmd ->
- %% If there is a valid VCS directory in the application directory,
- %% use that version info
- Extension = lists:concat([".", Vcs]),
- case filelib:is_dir(filename:join(Dir, Extension)) of
- true ->
- ?DEBUG("vcs_vsn: Primary vcs used for ~s\n", [Dir]),
- vcs_vsn_invoke(Cmd, Dir);
- false ->
- %% No VCS directory found for the app. Depending on source
- %% tree structure, there may be one higher up, but that can
- %% yield unexpected results when used with deps. So, we
- %% fallback to searching for a priv/vsn.Vcs file.
- VsnFile = filename:join([Dir, "priv", "vsn" ++ Extension]),
- case file:read_file(VsnFile) of
- {ok, VsnBin} ->
- ?DEBUG("vcs_vsn: Read ~s from priv/vsn.~p\n",
- [VsnBin, Vcs]),
- string:strip(binary_to_list(VsnBin), right, $\n);
- {error, enoent} ->
- ?DEBUG("vcs_vsn: Fallback to vcs for ~s\n", [Dir]),
- vcs_vsn_invoke(Cmd, Dir)
- end
- end
+ ?ABORT("vcs_vsn: ~s\n", [Reason])
end.
%% Temp work around for repos like relx that use "semver"