summaryrefslogtreecommitdiff
path: root/src/rebar_prv_lock.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_lock.erl')
-rw-r--r--src/rebar_prv_lock.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/rebar_prv_lock.erl b/src/rebar_prv_lock.erl
index 8a69434..e839168 100644
--- a/src/rebar_prv_lock.erl
+++ b/src/rebar_prv_lock.erl
@@ -30,16 +30,16 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
AllDeps = rebar_state:lock(State),
- Locks = lists:map(fun(Dep) ->
- Dir = rebar_app_info:dir(Dep),
- Source = rebar_app_info:source(Dep),
-
- %% If source is tuple it is a source dep
- %% e.g. {git, "git://github.com/ninenines/cowboy.git", "master"}
- {rebar_app_info:name(Dep)
- ,rebar_fetch:lock_source(Dir, Source)
- ,rebar_app_info:dep_level(Dep)}
- end, AllDeps),
+ Locks = [begin
+ Dir = rebar_app_info:dir(Dep),
+ Source = rebar_app_info:source(Dep),
+
+ %% If source is tuple it is a source dep
+ %% e.g. {git, "git://github.com/ninenines/cowboy.git", "master"}
+ {rebar_app_info:name(Dep)
+ ,rebar_fetch:lock_source(Dir, Source)
+ ,rebar_app_info:dep_level(Dep)}
+ end || Dep <- AllDeps, not(rebar_app_info:is_checkout(Dep))],
Dir = rebar_state:dir(State),
file:write_file(filename:join(Dir, ?LOCK_FILE), io_lib:format("~p.~n", [Locks])),
{ok, State}.