Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
shinohara-rin committed May 5, 2024
1 parent f5fc68d commit de1d4e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31083,9 +31083,8 @@ 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 = spawnSync('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost'], { stdio: ['inherit', 'pipe', 'pipe'] });
ssh.stdin.write('chmod +x /tmp/run.sh');
ssh.stdin.write('bash /tmp/run.sh');
let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost'], { stdio: ['inherit', 'pipe', 'pipe'] });
ssh.stdin.write(`chmod +x /tmp/run.sh\n/tmp/run.sh\n`);
ssh.on('close', (code) => {
show_message("info", `ssh exited with code ${code}`);
qemu_process.kill();
Expand Down
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,8 @@ 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 = spawnSync('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost'], { stdio: ['inherit', 'pipe', 'pipe'] });
ssh.stdin.write('chmod +x /tmp/run.sh');
ssh.stdin.write('bash /tmp/run.sh');
let ssh = spawn('ssh', ['-tt', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost'], { stdio: ['inherit', 'pipe', 'pipe'] });
ssh.stdin.write(`chmod +x /tmp/run.sh\n/tmp/run.sh\n`);
ssh.on('close', (code) => {
show_message("info", `ssh exited with code ${code}`);
qemu_process.kill();
Expand Down

0 comments on commit de1d4e8

Please sign in to comment.