2021-03-10 08:19:17 +01:00
|
|
|
const os = require('os');
|
|
|
|
|
2022-06-28 00:49:19 +01:00
|
|
|
module.exports = (linuxUseHomedir) => {
|
|
|
|
(process.env['OS'] != 'Windows_NT') ? {
|
2021-03-10 08:19:17 +01:00
|
|
|
|
2022-06-28 00:49:19 +01:00
|
|
|
// 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
|
|
|
|
// Adds ability to use use os.homedir() to try and counter https://github.com/nodejs/node/issues/25714
|
|
|
|
home: linuxUseHomedir === "true" ? os.homedir() : os.userInfo().homedir,
|
|
|
|
sshAgent: 'ssh-agent',
|
|
|
|
sshAdd: 'ssh-add'
|
2021-03-10 08:19:17 +01:00
|
|
|
|
2022-06-28 00:49:19 +01:00
|
|
|
} : {
|
2021-03-10 08:19:17 +01:00
|
|
|
|
2022-06-28 00:49:19 +01:00
|
|
|
home: os.homedir(),
|
|
|
|
sshAgent: 'c://progra~1//git//usr//bin//ssh-agent.exe',
|
|
|
|
sshAdd: 'c://progra~1//git//usr//bin//ssh-add.exe'
|
2021-03-10 08:19:17 +01:00
|
|
|
|
2022-06-28 00:49:19 +01:00
|
|
|
};
|
|
|
|
}
|