add git deploy key wrapper functionality

This commit is contained in:
Michael Carlson 2020-11-23 21:58:33 -07:00
parent 73d2440ad4
commit 17860381fc
9 changed files with 88 additions and 8 deletions

8
dist/cleanup.js vendored
View file

@ -129,6 +129,14 @@ try {
// Kill the started SSH agent
console.log('Stopping SSH agent')
execSync('kill ${SSH_AGENT_PID}', { stdio: 'inherit' })
const home = process.env['HOME'];
const homeSsh = `${home}/.ssh`;
const gitSSHWrapperPath = path.join(homeSsh, 'git-deploy-key-wrapper.sh');
if (fs.existsSync(gitSSHWrapperPath)) {
console.log('Removing ssh git SSH wrapper');
fs.unlinkSync(gitSSHWrapperPath);
}
} catch (error) {
console.log(error.message);
console.log('Error stopping the SSH agent, proceeding anyway');