Skip to content

Commit 2ee70be

Browse files
authored
fix recursive not end
1 parent b6528c8 commit 2ee70be

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/DependenceManager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ export class DependenceManager implements ManagerInterface {
8686
for (const fullname of result) {
8787
if (!fullname.startsWith('Device.'))
8888
continue; /* 排除非 Device 类型的组件 */
89-
const requiredName = fullname.replace('Device.', '');
90-
if (this.isInstalled(packName, requiredName))
91-
continue; /* 排除已安装的 */
92-
if (pendingList.includes(requiredName))
93-
continue; /* 排除队列中已存在的 */
94-
const compList = packageManager.FindAllComponents(requiredName);
89+
const reqName = fullname.replace('Device.', '');
90+
const compList = packageManager.FindAllComponents(reqName);
9591
if (compList) {
9692
for (const item of compList) {
93+
if (this.isInstalled(packName, item.groupName))
94+
continue; /* 排除已安装的 */
95+
if (pendingList.includes(item.groupName))
96+
continue; /* 排除队列中已存在的 */
9797
pendingList.push(item.groupName);
9898
GlobalEvent.emit('globalLog.append', `[Info] ${' '.repeat(pendingList.length)}-> install dependence component: ${item.groupName}\n`);
9999
this._installComponent(packName, item, pendingList);
@@ -102,7 +102,7 @@ export class DependenceManager implements ManagerInterface {
102102
} else {
103103
//throw new Error(`Not found required sub component: '${comp}'`);
104104
GlobalEvent.emit('globalLog.append',
105-
`[Warn] ${' '.repeat(pendingList.length)}Not found required sub component: '${requiredName}'\n`);
105+
`[Warn] ${' '.repeat(pendingList.length)}Not found required sub component: '${reqName}'\n`);
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)