When jetpack#add is called with same name's plugin, it checks against a:plugin that may inclues GitHub user name such as tani/jetpack, but key for s:declared_packages is plugin name such as jetpack, which is inconsistent.
Due to this issue, when the Lua API is used with requires, for example, it calls same plugin name to use(req) call at line around 853, which may override already declared plugin.
Solution
Use plugin name always for s:declared_packages.
This patch also includes minor indent fix.
Problems
When
jetpack#add
is called with same name's plugin, it checks againsta:plugin
that may inclues GitHub user name such astani/jetpack
, but key fors:declared_packages
is plugin name such asjetpack
, which is inconsistent.Due to this issue, when the Lua API is used with
requires
, for example, it calls same plugin name touse(req)
call at line around 853, which may override already declared plugin.Solution
Use plugin name always for
s:declared_packages
. This patch also includes minor indent fix.