From fe50362d9c82bdf1f20bdb35fb63699974bf13f0 Mon Sep 17 00:00:00 2001 From: whyour Date: Fri, 25 Apr 2025 01:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20command=20=E5=8F=98?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/dependence.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/back/services/dependence.ts b/back/services/dependence.ts index 5b36f61e..fd82b0f9 100644 --- a/back/services/dependence.ts +++ b/back/services/dependence.ts @@ -274,13 +274,13 @@ export default class DependenceService { : DependenceStatus.removing; await DependenceModel.update({ status }, { where: { id: depIds } }); - let depRunCommand = isInstall + let command = isInstall ? getInstallCommand(dependency.type, depName) : getUninstallCommand(dependency.type, depName); if (isLinuxDependence) { - depRunCommand = isInstall - ? linuxCommand.install - : linuxCommand.uninstall; + command = isInstall + ? `${linuxCommand.install} ${depName.trim()}` + : `${linuxCommand.uninstall} ${depName.trim()}`; } const startTime = dayjs();