mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle null coreNodesPath
This commit is contained in:
parent
05b58e9263
commit
d5f2255a68
@ -136,7 +136,9 @@ function start() {
|
||||
redNodes.cleanModuleList();
|
||||
}
|
||||
}
|
||||
log.info(log._("runtime.paths.settings",{path:settings.settingsFile}));
|
||||
if (settings.settingsFile) {
|
||||
log.info(log._("runtime.paths.settings",{path:settings.settingsFile}));
|
||||
}
|
||||
redNodes.loadFlows().then(redNodes.startFlows);
|
||||
}).otherwise(function(err) {
|
||||
console.log(err);
|
||||
|
@ -140,14 +140,16 @@ function scanTreeForNodesModules(moduleName) {
|
||||
results = results.concat(scanDirForNodesModules(userDir,moduleName));
|
||||
}
|
||||
|
||||
var up = path.resolve(path.join(dir,".."));
|
||||
while (up !== dir) {
|
||||
var pm = path.join(dir,"node_modules");
|
||||
if (pm != userDir) {
|
||||
results = results.concat(scanDirForNodesModules(pm,moduleName));
|
||||
if (dir) {
|
||||
var up = path.resolve(path.join(dir,".."));
|
||||
while (up !== dir) {
|
||||
var pm = path.join(dir,"node_modules");
|
||||
if (pm != userDir) {
|
||||
results = results.concat(scanDirForNodesModules(pm,moduleName));
|
||||
}
|
||||
dir = up;
|
||||
up = path.resolve(path.join(dir,".."));
|
||||
}
|
||||
dir = up;
|
||||
up = path.resolve(path.join(dir,".."));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
@ -188,11 +190,13 @@ function getModuleNodeFiles(module) {
|
||||
function getNodeFiles(disableNodePathScan) {
|
||||
var dir;
|
||||
// Find all of the nodes to load
|
||||
var nodeFiles = getLocalNodeFiles(path.resolve(settings.coreNodesDir));
|
||||
//console.log(nodeFiles);
|
||||
var nodeFiles = [];
|
||||
|
||||
var defaultLocalesPath = path.resolve(path.join(settings.coreNodesDir,"core","locales"));
|
||||
i18n.registerMessageCatalog("node-red",defaultLocalesPath,"messages.json");
|
||||
if (settings.coreNodesDir) {
|
||||
nodeFiles = getLocalNodeFiles(path.resolve(settings.coreNodesDir));
|
||||
var defaultLocalesPath = path.resolve(path.join(settings.coreNodesDir,"core","locales"));
|
||||
i18n.registerMessageCatalog("node-red",defaultLocalesPath,"messages.json");
|
||||
}
|
||||
|
||||
if (settings.userDir) {
|
||||
dir = path.join(settings.userDir,"nodes");
|
||||
|
Loading…
Reference in New Issue
Block a user