MCPcopy
hub / github.com/docmirror/dev-sidecar / linux

Function linux

packages/core/src/shell/scripts/setup-ca.js:18–28  ·  view source on GitHub ↗
(exec, { certPath })

Source from the content-addressed store, hash-verified

16 return true
17 },
18 async linux (exec, { certPath }) {
19 if (!certPath) {
20 throw new Error('证书路径为空,无法安装根证书。请确认证书文件已生成。')
21 }
22 if (!fs.existsSync(certPath)) {
23 throw new Error(`证书文件不存在: ${certPath}`)
24 }
25 const cmds = [`sudo cp ${certPath} /usr/local/share/ca-certificates`, 'sudo update-ca-certificates ']
26 await exec(cmds)
27 return true
28 },
29 async mac (exec, { certPath }) {
30 if (!certPath) {
31 throw new Error('证书路径为空,无法安装根证书。请确认证书文件已生成。')

Callers

nothing calls this directly

Calls 1

execFunction · 0.85

Tested by

no test coverage detected