mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
fix flowfile name to flows.json in settings
and warn if not set (as if anyone reads warnings) Move setting to top of settings.js as it will be edited more often. Default behaviour will still work (needs translations)
This commit is contained in:
@@ -38,6 +38,8 @@ var activeProject;
|
||||
|
||||
var globalGitUser = false;
|
||||
|
||||
var usingHostName = false;
|
||||
|
||||
function init(_settings, _runtime) {
|
||||
settings = _settings;
|
||||
runtime = _runtime;
|
||||
@@ -77,6 +79,7 @@ function init(_settings, _runtime) {
|
||||
} else {
|
||||
flowsFile = 'flows_'+require('os').hostname()+'.json';
|
||||
flowsFullPath = fspath.join(settings.userDir,flowsFile);
|
||||
usingHostName = true;
|
||||
}
|
||||
var ffExt = fspath.extname(flowsFullPath);
|
||||
var ffBase = fspath.basename(flowsFullPath,ffExt);
|
||||
@@ -526,7 +529,7 @@ async function getFlows() {
|
||||
if (projectsEnabled) {
|
||||
log.info(log._("storage.localfilesystem.projects.projects-directory", {projectsDirectory: projectsDir}));
|
||||
}
|
||||
|
||||
|
||||
if (activeProject) {
|
||||
// At this point activeProject will be a string, so go load it and
|
||||
// swap in an instance of Project
|
||||
@@ -541,6 +544,7 @@ async function getFlows() {
|
||||
} else {
|
||||
projectLogMessages.forEach(log.warn);
|
||||
}
|
||||
if (usingHostName) { log.warn(log._("storage.localfilesystem.warn_name")) };
|
||||
log.info(log._("storage.localfilesystem.flows-file",{path:flowsFullPath}));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user