diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-07-11 17:41:58 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-07-11 17:41:58 -0400 |
commit | 3ef93babc1e0a6e84deda08ff48fea909084840d (patch) | |
tree | 9e0b6431debe7f6136b42235977bff08793d1c89 /bootstrap | |
parent | 83fa49ed3c478aa8dcc968d07d8852e247c98ca9 (diff) | |
parent | a67ce27ac17234aae720ec159ef6eb733a30f716 (diff) |
Merge pull request #609 from tsloughter/global_plugin_bug
Global plugin bug
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -61,8 +61,12 @@ main(_Args) -> end. fetch_and_compile({Name, ErlFirstFiles}, Deps) -> - {Name, _, Repo} = lists:keyfind(Name, 1, Deps), - ok = fetch(Repo, Name), + case lists:keyfind(Name, 1, Deps) of + {Name, Vsn} -> + ok = fetch({pkg, atom_to_binary(Name, utf8), list_to_binary(Vsn)}, Name); + {Name, _, Source} -> + ok = fetch(Source, Name) + end, compile(Name, ErlFirstFiles). fetch({pkg, Name, Vsn}, App) -> @@ -279,6 +283,12 @@ write_windows_scripts() -> get_deps() -> case file:consult("rebar.lock") of + {ok, [[]]} -> + %% Something went wrong in a previous build, lock file shouldn't be empty + io:format("Empty list in lock file, deleting rebar.lock~n"), + ok = file:delete("rebar.lock"), + {ok, Config} = file:consult("rebar.config"), + proplists:get_value(deps, Config); {ok, [Deps]} -> [{binary_to_atom(Name, utf8), "", Source} || {Name, Source, _Level} <- Deps]; _ -> |