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

18
paths.js Normal file
View file

@ -0,0 +1,18 @@
const os = require('os');
module.exports = (process.env['OS'] != 'Windows_NT') ? {
// Use getent() system call, since this is what ssh does; makes a difference in Docker-based
// Action runs, where $HOME is different from the pwent
home: os.userInfo().homedir,
sshAgent: 'ssh-agent',
sshAdd: 'ssh-add'
} : {
home: os.homedir(),
sshAgent: 'c://progra~1//git//usr//bin//ssh-agent.exe',
sshAdd: 'c://progra~1//git//usr//bin//ssh-add.exe'
};