4b6f4eb000
* Use SSH binaries from the Git suite * Try to kill the ssh-agent upon action termination on Windows as well
13 lines
385 B
JavaScript
13 lines
385 B
JavaScript
const core = require('@actions/core');
|
|
const { execSync } = require('child_process');
|
|
const { sshAgent } = require('./paths.js');
|
|
|
|
try {
|
|
// Kill the started SSH agent
|
|
console.log('Stopping SSH agent');
|
|
execSync(sshAgent, ['-k'], { stdio: 'inherit' });
|
|
|
|
} catch (error) {
|
|
console.log(error.message);
|
|
console.log('Error stopping the SSH agent, proceeding anyway');
|
|
}
|