fix: 解决 node.js 模块更新失败的问题 (#2510)

pull/2512/head
zhengkunwang 2023-10-11 04:50:30 -05:00 committed by GitHub
parent c01b3764f8
commit cd376b2e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -506,7 +506,11 @@ func (r *RuntimeService) OperateNodeModules(req request.NodeModuleOperateReq) er
cmd += " remove"
}
case constant.RuntimeUpdate:
cmd += " update"
if req.PkgManager == constant.RuntimeNpm {
cmd += " update"
} else {
cmd += " upgrade"
}
}
cmd += " " + req.Module
return cmd2.ExecContainerScript(containerName, cmd, 5*time.Minute)