diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-05-22 14:56:33 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-05-22 14:56:33 -0500 |
commit | 37ac2b78333d23abfa9274ce773eb620f5813657 (patch) | |
tree | 5253df8ea57162ca9dd3b0805ee95f97337856dc /src | |
parent | 958213def79409b15dd61d51f3cfef1fb77cb82b (diff) |
read in app information after fetch so we have the deps
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_app_discover.erl | 7 | ||||
-rw-r--r-- | src/rebar_prv_install_deps.erl | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl index 74ab332..a79611d 100644 --- a/src/rebar_app_discover.erl +++ b/src/rebar_app_discover.erl @@ -124,7 +124,8 @@ find_apps(LibDirs, Validate) -> find_app(AppDir, Validate) -> AppFile = filelib:wildcard(filename:join([AppDir, "ebin", "*.app"])), AppSrcFile = filelib:wildcard(filename:join([AppDir, "src", "*.app.src"])), - try_handle_app_file(AppFile, AppDir, AppSrcFile, Validate). + AppInfo = try_handle_app_file(AppFile, AppDir, AppSrcFile, Validate), + AppInfo. app_dir(AppFile) -> filename:join(rebar_utils:droplast(filename:split(filename:dirname(AppFile)))). @@ -165,7 +166,7 @@ try_handle_app_file([File], AppDir, AppSrcFile, Validate) -> AppInfo1; Other when is_list(Other) -> throw({error, {multiple_app_files, Other}}) - end, + end, case Validate of valid -> case rebar_app_utils:validate_application_info(AppInfo2) of @@ -197,7 +198,7 @@ try_handle_app_src_file(_, _AppDir, [], _Validate) -> try_handle_app_src_file(_, _AppDir, _AppSrcFile, valid) -> false; try_handle_app_src_file(_, AppDir, [File], Validate) when Validate =:= invalid - ; Validate =:= all -> + ; Validate =:= all -> AppInfo = create_app_info(AppDir, File), case AppInfo of {error, Reason} -> diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index cdc008c..815d6c8 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -410,7 +410,7 @@ maybe_fetch(AppInfo, Profile, Upgrade, Seen, State) -> case fetch_app(AppInfo, AppDir, State) of true -> maybe_symlink_default(State, Profile, AppDir, AppInfo), - {true, update_app_info(AppInfo)}; + {true, update_app_info(AppDir, AppInfo)}; Other -> {Other, AppInfo} end; @@ -577,8 +577,9 @@ fetch_app(AppInfo, AppDir, State) -> throw(Error) end. -update_app_info(AppInfo) -> - AppDetails = rebar_app_info:app_details(AppInfo), +update_app_info(AppDir, AppInfo) -> + {true, Found} = rebar_app_discover:find_app(AppDir, all), + AppDetails = rebar_app_info:app_details(Found), Applications = proplists:get_value(applications, AppDetails, []), IncludedApplications = proplists:get_value(included_applications, AppDetails, []), AppInfo1 = rebar_app_info:applications( |