2021-03-10 02:19:17 -05:00
|
|
|
const core = require('@actions/core');
|
2021-06-11 09:17:22 -04:00
|
|
|
const { execFileSync } = require('child_process');
|
2022-10-19 07:27:50 -04:00
|
|
|
const { sshAgentCmd } = require('./paths.js');
|
2020-05-18 03:08:29 -04:00
|
|
|
|
|
|
|
try {
|
|
|
|
// Kill the started SSH agent
|
2021-03-10 02:19:17 -05:00
|
|
|
console.log('Stopping SSH agent');
|
2022-10-19 07:27:50 -04:00
|
|
|
execFileSync(sshAgentCmd, ['-k'], { stdio: 'inherit' });
|
2020-05-18 03:08:29 -04:00
|
|
|
} catch (error) {
|
2020-06-24 02:31:28 -04:00
|
|
|
console.log(error.message);
|
|
|
|
console.log('Error stopping the SSH agent, proceeding anyway');
|
2020-05-18 03:08:29 -04:00
|
|
|
}
|