Skip to content

Commit 0cbf50c

Browse files
committed
Handle raw option in rebar deps
1 parent 1d87a77 commit 0cbf50c

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

lib/mix/lib/mix/rebar.ex

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,27 @@ defmodule Mix.Rebar do
3232
def deps(config) do
3333
if deps = config[:deps] do
3434
Enum.map(deps, fn({ app, req, source }) ->
35-
{ scm, url } = case source do
36-
{ scm, url } -> { scm, to_binary(url) }
37-
{ scm, url, _ } -> { scm, to_binary(url) }
35+
scm = case source do
36+
{ scm, url } -> [{ scm, to_binary(url) }]
37+
{ scm, url, _ } -> [{ scm, to_binary(url) }]
3838
end
3939

40-
opts = case source do
40+
ref = case source do
4141
{ _, _, "" } -> [branch: "HEAD"]
4242
{ _, _, { :branch, branch } } -> [branch: to_binary(branch)]
4343
{ _, _, { :tag, tag } } -> [tag: to_binary(tag)]
4444
{ _, _, ref } -> [ref: to_binary(ref)]
4545
_ -> []
4646
end
47-
{ app, to_binary(req), [{scm, to_binary(url)}|opts] }
47+
48+
raw = case source do
49+
{ _, _, _, [:raw] } -> [app: false]
50+
{ _, _, _, [raw: true] } -> [app: false]
51+
_ -> []
52+
end
53+
54+
opts = scm ++ ref ++ raw
55+
{ app, to_binary(req), opts }
4856
end)
4957
else
5058
[]

0 commit comments

Comments
 (0)