Handle missing newline in private key
This commit is contained in:
parent
dc588b651f
commit
fe9075dfa6
5 changed files with 3994 additions and 3998 deletions
6
index.js
6
index.js
|
@ -5,7 +5,11 @@ const crypto = require('crypto');
|
|||
const { homePath, sshAgentCmdDefault, sshAddCmdDefault, gitCmdDefault } = require('./paths.js');
|
||||
|
||||
try {
|
||||
const privateKey = core.getInput('ssh-private-key');
|
||||
let privateKey = core.getInput('ssh-private-key');
|
||||
// Add a newline at the end of the private key if it is not already there
|
||||
if (privateKey && privateKey.slice(-1) !== '\n') {
|
||||
privateKey += '\n';
|
||||
}
|
||||
const logPublicKey = core.getBooleanInput('log-public-key', {default: true});
|
||||
|
||||
const sshAgentCmdInput = core.getInput('ssh-agent-cmd');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue