diff --git a/src/utils/global-state.ts b/src/utils/global-state.ts index 2f9d0116..ab53009c 100644 --- a/src/utils/global-state.ts +++ b/src/utils/global-state.ts @@ -76,7 +76,13 @@ async function initPackages(cliCurrentPath: string, preSelectPackage: string) { const currentPackagesPath = path.join(cliCurrentPath, PACKAGES_NAME); if (fs.existsSync(currentPackagesPath)) { - globalState.packages = fs.readdirSync(currentPackagesPath).map(folderName => { + globalState.packages = fs.readdirSync(currentPackagesPath).filter(folderName=>{ + if (folderName==='.DS_Store'){ + return false + } + + return true + }).map(folderName => { const packagePath = path.join(cliCurrentPath, PACKAGES_NAME, folderName); const packageJson: PackageJson = fs.readJSONSync(path.join(packagePath, 'package.json'), { throws: false }); diff --git a/src/utils/packages.ts b/src/utils/packages.ts index 83d8c405..b5c62a62 100644 --- a/src/utils/packages.ts +++ b/src/utils/packages.ts @@ -35,6 +35,7 @@ export const getPackages = (() => { .filter(each => { return !!each; }); + result = await Promise.all( submodulePaths.map(async submodulePath => { const packagesPathEndWithSep = packagesPath.dir.endsWith(path.sep)