mirror of
https://github.com/webfactory/ssh-agent.git
synced 2025-04-21 13:58:43 +00:00
Refactored version of https://github.com/webfactory/ssh-agent/pull/183. Fixes: https://github.com/webfactory/ssh-agent/issues/208
11 lines
359 B
JavaScript
11 lines
359 B
JavaScript
const { execFileSync } = require('child_process');
|
|
const { sshAgentCmd } = require('./paths.js');
|
|
|
|
try {
|
|
// Kill the started SSH agent
|
|
console.log('Stopping SSH agent');
|
|
execFileSync(sshAgentCmd, ['-k'], { stdio: 'inherit' });
|
|
} catch (error) {
|
|
console.log(error.message);
|
|
console.log('Error stopping the SSH agent, proceeding anyway');
|
|
}
|