diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-07-11 12:25:53 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-07-11 12:49:08 -0500 |
commit | 8dc0fafb36702703867306f8df16714f0dbdc17c (patch) | |
tree | 76c9fd7050a0e811200e438dbec6dd836ce30b75 /bootstrap | |
parent | 8aaff65d6bdd3a6d5f08d7d79fe9d5018d09b61b (diff) |
fix for empty rebar.lock during bootstrap
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 13 |
1 files changed, 11 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,11 @@ 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 + 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]; _ -> |