From 70b32f96a423734abc48bb9ab38fcfceaa7d63a8 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Fri, 10 Apr 2026 20:15:34 -0700 Subject: [PATCH] fix(installer): restore currentProjectDir writes for placeholder expansion The previous commit removed the three assignments to OfficialModules.currentProjectDir as dead code, but buildQuestion() still reads the property to resolve {directory_name} placeholders in module config defaults during interactive collection. Without the writes, any module default containing {directory_name} would surface the literal placeholder to users. --- tools/installer/modules/official-modules.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/installer/modules/official-modules.js b/tools/installer/modules/official-modules.js index 744c8dfa1..6158a7863 100644 --- a/tools/installer/modules/official-modules.js +++ b/tools/installer/modules/official-modules.js @@ -12,6 +12,9 @@ class OfficialModules { // Config collection state (merged from ConfigCollector) this.collectedConfig = {}; this._existingConfig = null; + // Tracked during interactive config collection so {directory_name} + // placeholder defaults can be resolved in buildQuestion(). + this.currentProjectDir = null; } /** @@ -1040,6 +1043,7 @@ class OfficialModules { * @returns {boolean} True if new fields were prompted, false if all fields existed */ async collectModuleConfigQuick(moduleName, projectDir, silentMode = true) { + this.currentProjectDir = projectDir; // Load existing config if not already loaded if (!this._existingConfig) { await this.loadExistingConfig(projectDir); @@ -1330,6 +1334,7 @@ class OfficialModules { * @param {boolean} skipCompletion - Skip showing completion message (for early core collection) */ async collectModuleConfig(moduleName, projectDir, skipLoadExisting = false, skipCompletion = false) { + this.currentProjectDir = projectDir; // Load existing config if needed and not already loaded if (!skipLoadExisting && !this._existingConfig) { await this.loadExistingConfig(projectDir);