(command, args, options = {})
| 51 | } |
| 52 | |
| 53 | function 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 | |
| 67 | function generateClientKey ({ dir, name, type, passphrase, bits }) { |
| 68 | const keyPath = path.join(dir, name) |
no outgoing calls
no test coverage detected