mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-22 01:00:50 +00:00
12 lines
412 B
JavaScript
12 lines
412 B
JavaScript
const core = require('@actions/core');
|
|
const { execFileSync } = require('child_process');
|
|
const { sshAgentCmdDefault } = require('./paths.js');
|
|
|
|
try {
|
|
// Kill the started SSH agent
|
|
console.log('Stopping SSH agent');
|
|
execFileSync(sshAgentCmdDefault, ['-k'], { stdio: 'inherit' });
|
|
} catch (error) {
|
|
console.log(error.message);
|
|
console.log('Error stopping the SSH agent, proceeding anyway');
|
|
}
|