ssh-agent/paths.js
Oktawian Chojnacki 0a5d1715cf
[BUGFIX] Resolve gitPath for git executable
Signed-off-by: Oktawian Chojnacki <oktawian@me.com>
2022-10-19 11:58:20 +02:00

19 lines
548 B
JavaScript

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',
gitPath: 'git'
} : {
home: os.homedir(),
sshAgent: 'c://progra~1//git//usr//bin//ssh-agent.exe',
sshAdd: 'c://progra~1//git//usr//bin//ssh-add.exe',
gitPath: 'c://progra~1//git//usr//bin//git.exe'
};