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

Function windows

packages/core/src/shell/scripts/get-system-env.js:9–22  ·  view source on GitHub ↗
(exec)

Source from the content-addressed store, hash-verified

7
8const executor = {
9 async windows (exec) {
10 const ret = await exec(['set'], { type: 'cmd' })
11 const map = {}
12 if (ret != null) {
13 const lines = ret.split('\r\n')
14 for (const item of lines) {
15 const kv = item.split('=')
16 if (kv.length > 1) {
17 map[kv[0].trim()] = kv[1].trim()
18 }
19 }
20 }
21 return map
22 },
23 async linux (exec, { port }) {
24 throw new Error('暂未实现此功能')
25 },

Callers

nothing calls this directly

Calls 1

execFunction · 0.85

Tested by

no test coverage detected