修复 command 变量

This commit is contained in:
whyour 2025-04-25 01:14:58 +08:00
parent 73ff23d315
commit b5e6bfd283

View File

@ -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();