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();
|
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);
|
redNodes.loadFlows().then(redNodes.startFlows);
|
||||||
}).otherwise(function(err) {
|
}).otherwise(function(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
@ -140,14 +140,16 @@ function scanTreeForNodesModules(moduleName) {
|
|||||||
results = results.concat(scanDirForNodesModules(userDir,moduleName));
|
results = results.concat(scanDirForNodesModules(userDir,moduleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
var up = path.resolve(path.join(dir,".."));
|
if (dir) {
|
||||||
while (up !== dir) {
|
var up = path.resolve(path.join(dir,".."));
|
||||||
var pm = path.join(dir,"node_modules");
|
while (up !== dir) {
|
||||||
if (pm != userDir) {
|
var pm = path.join(dir,"node_modules");
|
||||||
results = results.concat(scanDirForNodesModules(pm,moduleName));
|
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;
|
return results;
|
||||||
}
|
}
|
||||||
@ -188,11 +190,13 @@ function getModuleNodeFiles(module) {
|
|||||||
function getNodeFiles(disableNodePathScan) {
|
function getNodeFiles(disableNodePathScan) {
|
||||||
var dir;
|
var dir;
|
||||||
// Find all of the nodes to load
|
// Find all of the nodes to load
|
||||||
var nodeFiles = getLocalNodeFiles(path.resolve(settings.coreNodesDir));
|
var nodeFiles = [];
|
||||||
//console.log(nodeFiles);
|
|
||||||
|
|
||||||
var defaultLocalesPath = path.resolve(path.join(settings.coreNodesDir,"core","locales"));
|
if (settings.coreNodesDir) {
|
||||||
i18n.registerMessageCatalog("node-red",defaultLocalesPath,"messages.json");
|
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) {
|
if (settings.userDir) {
|
||||||
dir = path.join(settings.userDir,"nodes");
|
dir = path.join(settings.userDir,"nodes");
|
||||||
|
Loading…
Reference in New Issue
Block a user