ssh-agent/cleanup.js
Oktawian Chojnacki 4b29c05a2e
[NAMING] Add *Path suffix where applicable
Signed-off-by: Oktawian Chojnacki <oktawian@me.com>
2022-10-19 12:13:54 +02:00

12 lines
400 B
JavaScript

const core = require('@actions/core');
const { execFileSync } = require('child_process');
const { sshAgentPath } = require('./paths.js');
try {
// Kill the started SSH agent
console.log('Stopping SSH agent');
execFileSync(sshAgentPath, ['-k'], { stdio: 'inherit' });
} catch (error) {
console.log(error.message);
console.log('Error stopping the SSH agent, proceeding anyway');
}