This commit fixes a bug in the IDE setup script that prevented expansion packs not prefixed with "bmad-" from being discovered.
The `getInstalledExpansionPacks` function in `tools/installer/lib/ide-setup.js` was using a glob pattern `.bmad-*` to find installed expansion packs. This was too specific and did not match the newly created `wechat-mini-game-dev` expansion pack, which is installed as `.wechat-mini-game-dev`. The glob pattern has been changed to `.*` and an ignore list has been added to exclude common dot-prefixed directories like `.git` and `.vscode`. This ensures that all installed expansion packs are correctly identified and configured for the user's IDE.
This commit is contained in:
parent
c1c3b2fda3
commit
3d61531a16
|
|
@ -683,10 +683,27 @@ class IdeSetup extends BaseIdeSetup {
|
||||||
|
|
||||||
// Check for dot-prefixed expansion packs in install directory
|
// Check for dot-prefixed expansion packs in install directory
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
const dotExpansions = glob.sync('.bmad-*', { cwd: installDir });
|
const dotExpansions = glob.sync('.*', {
|
||||||
|
cwd: installDir,
|
||||||
|
ignore: [
|
||||||
|
'.bmad-core',
|
||||||
|
'.git',
|
||||||
|
'.github',
|
||||||
|
'.vscode',
|
||||||
|
'.cursor',
|
||||||
|
'.claude',
|
||||||
|
'.crush',
|
||||||
|
'.windsurf',
|
||||||
|
'.trae',
|
||||||
|
'.roo',
|
||||||
|
'.cline',
|
||||||
|
'.kilo',
|
||||||
|
'.gemini',
|
||||||
|
'.qwen',
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
for (const dotExpansion of dotExpansions) {
|
for (const dotExpansion of dotExpansions) {
|
||||||
if (dotExpansion !== '.bmad-core') {
|
|
||||||
const packPath = path.join(installDir, dotExpansion);
|
const packPath = path.join(installDir, dotExpansion);
|
||||||
const packName = dotExpansion.slice(1); // remove the dot
|
const packName = dotExpansion.slice(1); // remove the dot
|
||||||
expansionPacks.push({
|
expansionPacks.push({
|
||||||
|
|
@ -694,7 +711,6 @@ class IdeSetup extends BaseIdeSetup {
|
||||||
path: packPath,
|
path: packPath,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Check for expansion-packs directory style
|
// Check for expansion-packs directory style
|
||||||
const expansionPacksDir = path.join(installDir, 'expansion-packs');
|
const expansionPacksDir = path.join(installDir, 'expansion-packs');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue