From 25e92c350137429da8e189075eb798544465d6d9 Mon Sep 17 00:00:00 2001 From: Marek Serafin Date: Sat, 18 Oct 2025 18:04:06 +0200 Subject: [PATCH] Fix race condition in projects initialization Add missing return statement for gitTools.init() promise to ensure activeProject is set before getFlows() is called during startup. Fixes intermittent 'No active project' warnings when projects feature is enabled. --- .../runtime/lib/storage/localfilesystem/projects/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js index ca87d76e9..bb8b7861e 100644 --- a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js +++ b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js @@ -92,7 +92,7 @@ function init(_settings, _runtime) { if (projectsEnabled) { return sshTools.init(settings,runtime).then(function() { - gitTools.init(_settings).then(function(gitConfig) { + return gitTools.init(_settings).then(function(gitConfig) { if (!gitConfig || /^1\./.test(gitConfig.version)) { if (!gitConfig) { projectLogMessages.push(log._("storage.localfilesystem.projects.git-not-found"))