fix(installer): clean up temp dir leak and conditional IDE footer
- Return fixture root from createSkillCollisionFixture so cleanup removes the parent temp directory, not just the _bmad child - Only show bmad-help next-step line when IDEs are configured
This commit is contained in:
parent
55a0d963a4
commit
0071f1cf4f
|
|
@ -132,7 +132,7 @@ async function createSkillCollisionFixture() {
|
|||
),
|
||||
);
|
||||
|
||||
return fixtureDir;
|
||||
return { root: fixtureRoot, bmadDir: fixtureDir };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1829,17 +1829,18 @@ async function runTests() {
|
|||
// ============================================================
|
||||
console.log(`${colors.yellow}Test Suite 31: Skill Count Reporting${colors.reset}\n`);
|
||||
|
||||
let collisionFixture = null;
|
||||
let collisionFixtureRoot = null;
|
||||
let collisionProjectDir = null;
|
||||
|
||||
try {
|
||||
clearCache();
|
||||
collisionFixture = await createSkillCollisionFixture();
|
||||
const collisionFixture = await createSkillCollisionFixture();
|
||||
collisionFixtureRoot = collisionFixture.root;
|
||||
collisionProjectDir = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-antigravity-test-'));
|
||||
|
||||
const ideManager = new IdeManager();
|
||||
await ideManager.ensureInitialized();
|
||||
const result = await ideManager.setup('antigravity', collisionProjectDir, collisionFixture, {
|
||||
const result = await ideManager.setup('antigravity', collisionProjectDir, collisionFixture.bmadDir, {
|
||||
silent: true,
|
||||
selectedModules: ['core'],
|
||||
});
|
||||
|
|
@ -1862,7 +1863,7 @@ async function runTests() {
|
|||
assert(false, 'Skill-format unique count test succeeds', error.message);
|
||||
} finally {
|
||||
if (collisionProjectDir) await fs.remove(collisionProjectDir).catch(() => {});
|
||||
if (collisionFixture) await fs.remove(collisionFixture).catch(() => {});
|
||||
if (collisionFixtureRoot) await fs.remove(collisionFixtureRoot).catch(() => {});
|
||||
}
|
||||
|
||||
console.log('');
|
||||
|
|
|
|||
|
|
@ -1430,8 +1430,10 @@ class Installer {
|
|||
` Join our Discord: ${color.dim('https://discord.gg/gk8jAdXWmj')}`,
|
||||
` Star us on GitHub: ${color.dim('https://github.com/bmad-code-org/BMAD-METHOD/')}`,
|
||||
` Subscribe on YouTube: ${color.dim('https://www.youtube.com/@BMadCode')}`,
|
||||
` Invoke the ${color.cyan('bmad-help')} skill in your IDE Agent to get started`,
|
||||
);
|
||||
if (context.ides && context.ides.length > 0) {
|
||||
lines.push(` Invoke the ${color.cyan('bmad-help')} skill in your IDE Agent to get started`);
|
||||
}
|
||||
|
||||
await prompts.note(lines.join('\n'), 'BMAD is ready to use!');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue