From cd748f68cd73208d551e527b79cdbb31ee04b557 Mon Sep 17 00:00:00 2001 From: Rin Date: Sun, 5 May 2024 21:23:16 +0800 Subject: [PATCH] zdrghu --- dist/index.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 82a703c..91ecf95 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31084,7 +31084,7 @@ function start_vm(qemu_version, os, cpu, arch, bios, machine, filename, pubkey) qemu_wrapper(qemu_executable, qemu_args, (qemu_process) => { let runScript = core.getInput('run'); fs.writeFileSync('/tmp/run.sh', runScript); - let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey.split('.')[0], 'root@localhost'],); + let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey.replace('.pub', ''), 'root@localhost'],); ssh.stdout.pipe(process.stdout); ssh.stderr.pipe(process.stderr); ssh.stdin.write(`chmod +x /tmp/run.sh\n/tmp/run.sh\n`); diff --git a/index.js b/index.js index 361de0f..252f053 100644 --- a/index.js +++ b/index.js @@ -194,7 +194,7 @@ function start_vm(qemu_version, os, cpu, arch, bios, machine, filename, pubkey) qemu_wrapper(qemu_executable, qemu_args, (qemu_process) => { let runScript = core.getInput('run'); fs.writeFileSync('/tmp/run.sh', runScript); - let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey.split('.')[0], 'root@localhost'],); + let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey.replace('.pub', ''), 'root@localhost'],); ssh.stdout.pipe(process.stdout); ssh.stderr.pipe(process.stderr); ssh.stdin.write(`chmod +x /tmp/run.sh\n/tmp/run.sh\n`);