From 724cdd07a199cb12b82236ad34ca1a0c61eb43e2 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Thu, 19 Jun 2025 12:31:27 -0500 Subject: [PATCH] fix: update file-manager to properly handle YAML manifest files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added js-yaml import for YAML parsing - Updated readManifest to parse YAML instead of JSON - Updated createManifest to write YAML instead of JSON - Fixes installation error when updating existing BMAD installations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- tools/installer/lib/file-manager.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/installer/lib/file-manager.js b/tools/installer/lib/file-manager.js index efb7c5ff..69b017c4 100644 --- a/tools/installer/lib/file-manager.js +++ b/tools/installer/lib/file-manager.js @@ -2,6 +2,7 @@ const fs = require("fs-extra"); const path = require("path"); const crypto = require("crypto"); const glob = require("glob"); +const yaml = require("js-yaml"); // Dynamic import for ES module let chalk; @@ -106,7 +107,7 @@ class FileManager { // Write manifest await fs.ensureDir(path.dirname(manifestPath)); - await fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2)); + await fs.writeFile(manifestPath, yaml.dump(manifest, { indent: 2 })); return manifest; } @@ -120,7 +121,7 @@ class FileManager { try { const content = await fs.readFile(manifestPath, "utf8"); - return JSON.parse(content); + return yaml.load(content); } catch (error) { return null; }