mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-27 19:23:56 +00:00
a45226bfaf
execSync just started a second ssh-agent. `['-k']` argument was treated as options, it didn't have `stdio` set, so stdio was piped and returned (and ignored).
12 lines
392 B
JavaScript
12 lines
392 B
JavaScript
const core = require('@actions/core');
|
|
const { execFileSync } = require('child_process');
|
|
const { sshAgent } = require('./paths.js');
|
|
|
|
try {
|
|
// Kill the started SSH agent
|
|
console.log('Stopping SSH agent');
|
|
execFileSync(sshAgent, ['-k'], { stdio: 'inherit' });
|
|
} catch (error) {
|
|
console.log(error.message);
|
|
console.log('Error stopping the SSH agent, proceeding anyway');
|
|
}
|