mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
quickinstall duplicate success message removed
This commit is contained in:
@@ -3,6 +3,7 @@ const fs = require('fs-extra');
|
||||
const os = require('node:os');
|
||||
const chalk = require('chalk');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { getTasksFromBmad } = require('./shared/bmad-artifacts');
|
||||
@@ -130,7 +131,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
const projectSpecificDir = this.getCodexPromptDir(projectDir_local, 'project');
|
||||
|
||||
// Check global location
|
||||
if (await fs.pathExists(globalDir)) {
|
||||
if (await this.exists(globalDir)) {
|
||||
const entries = await fs.readdir(globalDir);
|
||||
if (entries.some((entry) => entry.startsWith('bmad-'))) {
|
||||
return true;
|
||||
@@ -138,7 +139,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
// Check project-specific location
|
||||
if (await fs.pathExists(projectSpecificDir)) {
|
||||
if (await this.exists(projectSpecificDir)) {
|
||||
const entries = await fs.readdir(projectSpecificDir);
|
||||
if (entries.some((entry) => entry.startsWith('bmad-'))) {
|
||||
return true;
|
||||
@@ -207,7 +208,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
|
||||
getCodexPromptDir(projectDir = null, location = 'global') {
|
||||
if (location === 'project' && projectDir) {
|
||||
return path.join(projectDir, '.codex', 'prompts');
|
||||
return PathUtils.getIdeSubDir(projectDir, '.codex', 'prompts');
|
||||
}
|
||||
return path.join(os.homedir(), '.codex', 'prompts');
|
||||
}
|
||||
@@ -218,7 +219,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
for (const artifact of artifacts) {
|
||||
const flattenedName = this.flattenFilename(artifact.relativePath);
|
||||
const targetPath = path.join(destDir, flattenedName);
|
||||
await fs.writeFile(targetPath, artifact.content);
|
||||
await this.writeFile(targetPath, artifact.content);
|
||||
written++;
|
||||
}
|
||||
|
||||
@@ -226,7 +227,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
async clearOldBmadFiles(destDir) {
|
||||
if (!(await fs.pathExists(destDir))) {
|
||||
if (!(await this.exists(destDir))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -248,7 +249,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
async readAndProcessWithProject(filePath, metadata, projectDir) {
|
||||
const content = await fs.readFile(filePath, 'utf8');
|
||||
const content = await this.readFile(filePath);
|
||||
return super.processContent(content, metadata, projectDir);
|
||||
}
|
||||
|
||||
@@ -376,7 +377,7 @@ You must fully embody this agent's persona and follow all activation instruction
|
||||
|
||||
const fileName = `bmad-custom-agents-${agentName}.md`;
|
||||
const launcherPath = path.join(destDir, fileName);
|
||||
await fs.writeFile(launcherPath, launcherContent, 'utf8');
|
||||
await this.writeFile(launcherPath, launcherContent);
|
||||
|
||||
return {
|
||||
path: path.relative(projectDir, launcherPath),
|
||||
|
||||
Reference in New Issue
Block a user