From 82f437d4b2a86140d8951a63d07eca34c89cb60e Mon Sep 17 00:00:00 2001 From: Rin Date: Sun, 5 May 2024 20:56:46 +0800 Subject: [PATCH] ? --- 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 5182bdb..82a703c 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, 'root@localhost'],); + let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey.split('.')[0], '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 6ba6091..361de0f 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, 'root@localhost'],); + let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey.split('.')[0], '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`);