Skip to content

Commit 1cd341a

Browse files
committed
ensure we don't search for modules that should already be installed because they're in the dependencies list (fix #72)
1 parent f17383a commit 1cd341a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/appinfo.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,12 @@ function parseJS(storageFile, options, app) {
117117
});
118118

119119
// add any modules that were defined for this app (no need to search for them!)
120-
builtinModules = builtinModules.concat(app.storage.map(f=>f.name).filter(name => name && !name.includes(".")));
121-
// Check for modules in pre-installed apps?
120+
builtinModules = builtinModules.concat(
121+
app.storage.map(f=>f.name).filter(name => name && !name.includes(".")));
122+
// If this app depends on any modules, add those to the list of built-ins
123+
if (app.dependencies)
124+
builtinModules = builtinModules.concat(Object.keys(app.dependencies).filter(d=>app.dependencies[d]=="module"))
125+
// Check for modules in pre-installed apps
122126
if (options.device.appsInstalled)
123127
options.device.appsInstalled.forEach(app => {
124128
/* we can't use provides_modules here because these apps are loaded

0 commit comments

Comments
 (0)