Update ide-setup.js - add missing glob require

This commit is contained in:
VansonLeung 2025-08-27 11:25:14 +08:00 committed by GitHub
parent a900d28080
commit 7c129411d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -528,6 +528,7 @@ class IdeSetup extends BaseIdeSetup {
// Check common tasks // Check common tasks
const commonTasksDir = path.join(installDir, 'common', 'tasks'); const commonTasksDir = path.join(installDir, 'common', 'tasks');
if (await fileManager.pathExists(commonTasksDir)) { if (await fileManager.pathExists(commonTasksDir)) {
const glob = require('glob');
const commonTaskFiles = glob.sync('*.md', { cwd: commonTasksDir }); const commonTaskFiles = glob.sync('*.md', { cwd: commonTasksDir });
allTaskIds.push(...commonTaskFiles.map((file) => path.basename(file, '.md'))); allTaskIds.push(...commonTaskFiles.map((file) => path.basename(file, '.md')));
} }