From 1c2ea56f42ea634872b01b2c0f925a7d80b726bd Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 8 Jan 2018 16:10:54 +0000 Subject: [PATCH] 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. --- red/runtime/storage/localfilesystem/projects/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/red/runtime/storage/localfilesystem/projects/index.js b/red/runtime/storage/localfilesystem/projects/index.js index e124675b9..f1ddad831 100644 --- a/red/runtime/storage/localfilesystem/projects/index.js +++ b/red/runtime/storage/localfilesystem/projects/index.js @@ -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")) }