From 4bd2b579c8b4def5353f4145f7392358f0fbaef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andra=CC=81s=20Boroska?= Date: Sun, 2 Dec 2018 20:28:22 +0100 Subject: fix pkg name during update by using pkg_name understood by hex --- src/rebar_prv_upgrade.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_prv_upgrade.erl b/src/rebar_prv_upgrade.erl index b1b1b16..565f342 100644 --- a/src/rebar_prv_upgrade.erl +++ b/src/rebar_prv_upgrade.erl @@ -132,11 +132,13 @@ update_pkg_deps([], _, _) -> update_pkg_deps([{Name, _, _} | Rest], AppInfos, State) -> case rebar_app_utils:find(Name, AppInfos) of {ok, AppInfo} -> - case element(1, rebar_app_info:source(AppInfo)) of + Source = rebar_app_info:source(AppInfo), + case element(1, Source) of pkg -> Resources = rebar_state:resources(State), #{repos := RepoConfigs} = rebar_resource_v2:find_resource_state(pkg, Resources), - [update_package(Name, RepoConfig, State) || RepoConfig <- RepoConfigs]; + PkgName = element(2, Source), + [update_package(PkgName, RepoConfig, State) || RepoConfig <- RepoConfigs]; _ -> skip end; -- cgit v1.1