mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-25 02:18:03 +00:00
Handle missing newline in private key
This commit is contained in:
parent
dc588b651f
commit
fe9075dfa6
5 changed files with 3994 additions and 3998 deletions
3878
dist/cleanup.js
vendored
3878
dist/cleanup.js
vendored
File diff suppressed because it is too large
Load diff
4044
dist/index.js
vendored
4044
dist/index.js
vendored
File diff suppressed because it is too large
Load diff
6
index.js
6
index.js
|
@ -5,7 +5,11 @@ const crypto = require('crypto');
|
||||||
const { homePath, sshAgentCmdDefault, sshAddCmdDefault, gitCmdDefault } = require('./paths.js');
|
const { homePath, sshAgentCmdDefault, sshAddCmdDefault, gitCmdDefault } = require('./paths.js');
|
||||||
|
|
||||||
try {
|
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 logPublicKey = core.getBooleanInput('log-public-key', {default: true});
|
||||||
|
|
||||||
const sshAgentCmdInput = core.getInput('ssh-agent-cmd');
|
const sshAgentCmdInput = core.getInput('ssh-agent-cmd');
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^1.9.1",
|
||||||
"@zeit/ncc": "^0.20.5"
|
"@vercel/ncc": "^0.38.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node scripts/build.js"
|
"build": "node scripts/build.js"
|
||||||
|
|
40
yarn.lock
40
yarn.lock
|
@ -3,31 +3,31 @@
|
||||||
|
|
||||||
|
|
||||||
"@actions/core@^1.9.1":
|
"@actions/core@^1.9.1":
|
||||||
"integrity" "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA=="
|
version "1.9.1"
|
||||||
"resolved" "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz"
|
resolved "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz"
|
||||||
"version" "1.9.1"
|
integrity sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/http-client" "^2.0.1"
|
"@actions/http-client" "^2.0.1"
|
||||||
"uuid" "^8.3.2"
|
uuid "^8.3.2"
|
||||||
|
|
||||||
"@actions/http-client@^2.0.1":
|
"@actions/http-client@^2.0.1":
|
||||||
"integrity" "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw=="
|
version "2.0.1"
|
||||||
"resolved" "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz"
|
resolved "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz"
|
||||||
"version" "2.0.1"
|
integrity sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"tunnel" "^0.0.6"
|
tunnel "^0.0.6"
|
||||||
|
|
||||||
"@zeit/ncc@^0.20.5":
|
"@vercel/ncc@^0.38.1":
|
||||||
"integrity" "sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw=="
|
version "0.38.1"
|
||||||
"resolved" "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz"
|
resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.38.1.tgz#13f08738111e1d9e8a22fd6141f3590e54d9a60e"
|
||||||
"version" "0.20.5"
|
integrity sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==
|
||||||
|
|
||||||
"tunnel@^0.0.6":
|
tunnel@^0.0.6:
|
||||||
"integrity" "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
|
version "0.0.6"
|
||||||
"resolved" "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz"
|
resolved "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz"
|
||||||
"version" "0.0.6"
|
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
||||||
|
|
||||||
"uuid@^8.3.2":
|
uuid@^8.3.2:
|
||||||
"integrity" "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
|
version "8.3.2"
|
||||||
"resolved" "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz"
|
resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz"
|
||||||
"version" "8.3.2"
|
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
||||||
|
|
Loading…
Reference in a new issue