修复取消安装依赖

This commit is contained in:
whyour 2025-06-22 21:47:39 +08:00
parent 1d8403c0ec
commit 7a92e7c6ab

View File

@ -163,11 +163,9 @@ export default class DependenceService {
taskLimit.removeQueuedDependency(doc); taskLimit.removeQueuedDependency(doc);
const depInstallCommand = getInstallCommand(doc.type, doc.name); const depInstallCommand = getInstallCommand(doc.type, doc.name);
const depUnInstallCommand = getUninstallCommand(doc.type, doc.name); const depUnInstallCommand = getUninstallCommand(doc.type, doc.name);
const installCmd = `${depInstallCommand} ${doc.name.trim()}`;
const unInstallCmd = `${depUnInstallCommand} ${doc.name.trim()}`;
const pids = await Promise.all([ const pids = await Promise.all([
getPid(installCmd), getPid(depInstallCommand),
getPid(unInstallCmd), getPid(depUnInstallCommand),
]); ]);
for (const pid of pids) { for (const pid of pids) {
pid && (await killTask(pid)); pid && (await killTask(pid));