MCPcopy
hub / github.com/electerm/electerm / runCommand

Function runCommand

test/unit-ci/session-ssh.spec.js:53–65  ·  view source on GitHub ↗
(command, args, options = {})

Source from the content-addressed store, hash-verified

51}
52
53function runCommand (command, args, options = {}) {
54 const result = spawnSync(command, args, {
55 encoding: 'utf8',
56 ...options
57 })
58 if (result.error) {
59 throw result.error
60 }
61 if (result.status !== 0) {
62 throw new Error(`${command} ${args.join(' ')} failed: ${result.stderr || result.stdout}`)
63 }
64 return result.stdout
65}
66
67function generateClientKey ({ dir, name, type, passphrase, bits }) {
68 const keyPath = path.join(dir, name)

Callers 4

generateClientKeyFunction · 0.70
startAgentFunction · 0.70
killFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected