(filename = '')
| 5 | |
| 6 | const KNOWN_HOSTS = 'known_hosts'; |
| 7 | const getPrivateKeyPath = (filename = '') => { |
| 8 | const { HOME } = process.env; |
| 9 | const dir = join(HOME || '~', '.ssh'); |
| 10 | const knownHostsPath = join(dir, KNOWN_HOSTS); |
| 11 | return { |
| 12 | dir, |
| 13 | filename, |
| 14 | path: join(dir, filename), |
| 15 | knownHostsPath |
| 16 | }; |
| 17 | }; |
| 18 | |
| 19 | const addSshKey = (content, deployKeyName) => { |
| 20 | const { dir, filename } = getPrivateKeyPath(deployKeyName); |
no outgoing calls
no test coverage detected