fix: honor original working directory when running npx installer and searching for task files

(cherry picked from commit 6a5a597fe39bc75379f54bedc1616bfab283dfa1)
This commit is contained in:
manjaroblack
2025-08-18 19:20:20 -05:00
parent 7e2780cd3e
commit 17e7d14cc2
4 changed files with 10 additions and 6 deletions

View File

@@ -27,7 +27,8 @@ class Installer {
try {
// Store the original CWD where npx was executed
const originalCwd = process.env.INIT_CWD || process.env.PWD || process.cwd();
const originalCwd =
process.env.BMAD_ORIGINAL_CWD || process.env.INIT_CWD || process.env.PWD || process.cwd();
// Resolve installation directory relative to where the user ran the command
let installDir = path.isAbsolute(config.directory)