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:
Nick O'Leary 2018-01-08 16:10:54 +00:00
parent 1d7ae300e2
commit 1c2ea56f42
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 7 additions and 0 deletions

View File

@ -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"))
}