Updating the action to have a choice for how user is looked up on linux
This commit is contained in:
parent
53715f806b
commit
815a336fc0
8 changed files with 133 additions and 69 deletions
27
dist/cleanup.js
vendored
27
dist/cleanup.js
vendored
|
@ -488,23 +488,24 @@ module.exports = require("fs");
|
|||
|
||||
const os = __webpack_require__(87);
|
||||
|
||||
module.exports = (process.env['OS'] != 'Windows_NT') ? {
|
||||
module.exports = (linuxUseHomedir) => {
|
||||
(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'
|
||||
// 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'
|
||||
|
||||
} : {
|
||||
|
||||
home: os.homedir(),
|
||||
sshAgent: 'c://progra~1//git//usr//bin//ssh-agent.exe',
|
||||
sshAdd: 'c://progra~1//git//usr//bin//ssh-add.exe'
|
||||
|
||||
};
|
||||
} : {
|
||||
|
||||
home: os.homedir(),
|
||||
sshAgent: 'c://progra~1//git//usr//bin//ssh-agent.exe',
|
||||
sshAdd: 'c://progra~1//git//usr//bin//ssh-add.exe'
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/***/ })
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue