With newline

This commit is contained in:
Andreas Svanberg 2024-10-17 10:31:56 +02:00
parent 4b2b729981
commit 90c2393557
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored

@ -87,7 +87,7 @@ function main() {
}
const sshKey = core.getInput('ssh-key', { required: true });
core.info(`sshKey: ${sshKey.length}`);
fs.writeFileSync('ssh_key', sshKey, { flag: 'w+', mode: "0600" });
fs.writeFileSync('ssh_key', `${sshKey}\n`, { flag: 'w+', mode: "0600" });
const pipedCommand = `pwd | ls -l`;
yield exec.exec('sh', ['-c', `${pipedCommand}`]);
yield exec.exec('cat', ['ssh_key']);

@ -53,7 +53,7 @@ async function main() {
const sshKey = core.getInput('ssh-key', {required: true});
core.info(`sshKey: ${sshKey.length}`);
fs.writeFileSync('ssh_key', sshKey, {flag: 'w+', mode: "0600"});
fs.writeFileSync('ssh_key', `${sshKey}\n`, {flag: 'w+', mode: "0600"});
const pipedCommand = `pwd | ls -l`;
await exec.exec('sh', ['-c', `${pipedCommand}`]);