Windows virtual environment: Use SSH binaries from the Git suite (#63)

* Use SSH binaries from the Git suite

* Try to kill the ssh-agent upon action termination on Windows as well
This commit is contained in:
Matthias Pigulla 2021-03-10 08:19:17 +01:00 committed by GitHub
parent 795485730f
commit 4b6f4eb000
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 182 additions and 146 deletions

View file

@ -1,10 +1,12 @@
const core = require('@actions/core')
const { execSync } = require('child_process')
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('kill ${SSH_AGENT_PID}', { stdio: 'inherit' })
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');