mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Allow a project to be specified on the command-line
Reuses the existing flowFile - if its value is found to be the name of an existing project, that project is set as the active one. If it is not the name of an existing project, it is ignored.
This commit is contained in:
parent
1d7ae300e2
commit
1c2ea56f42
@ -107,6 +107,13 @@ function init(_settings, _runtime) {
|
||||
} else {
|
||||
activeProject = globalSettings.projects.activeProject;
|
||||
}
|
||||
if (settings.flowFile) {
|
||||
if (globalSettings.projects.projects.hasOwnProperty(settings.flowFile)) {
|
||||
activeProject = settings.flowFile;
|
||||
globalSettings.projects.activeProject = settings.flowFile;
|
||||
saveSettings = true;
|
||||
}
|
||||
}
|
||||
if (!activeProject) {
|
||||
projectLogMessages.push(log._("storage.localfilesystem.no-active-project"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user