MCPcopy Index your code
hub / github.com/easingthemes/ssh-deploy / getPrivateKeyPath

Function getPrivateKeyPath

src/sshKey.js:7–17  ·  view source on GitHub ↗
(filename = '')

Source from the content-addressed store, hash-verified

5
6const KNOWN_HOSTS = 'known_hosts';
7const 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
19const addSshKey = (content, deployKeyName) => {
20 const { dir, filename } = getPrivateKeyPath(deployKeyName);

Callers 3

runFunction · 0.85
addSshKeyFunction · 0.85
updateKnownHostsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected