diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-12-03 11:21:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 11:21:59 -0500 |
commit | d27eb3aad0c4849399d31309f68990584ac51791 (patch) | |
tree | 7992f4e06f156a409c43724be506cc4a7951aa35 /src | |
parent | 62ffde8e2a6176fb79c07bd0502df7fd7d5af33c (diff) | |
parent | 4bd2b579c8b4def5353f4145f7392358f0fbaef4 (diff) |
Merge pull request #1966 from aboroska/fix-upgrade-pkg-name
Fix pkg name during update by using pkg_name understood by hex
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_upgrade.erl | 6 |
1 files changed, 4 insertions, 2 deletions
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; |