Fix SSH command quoting — pass cmd directly, drop sh -c wrapper
This commit is contained in:
parent
603a41f04a
commit
801b1e6bd8
1 changed files with 2 additions and 2 deletions
|
|
@ -133,7 +133,7 @@ async function sshExec(host, command) {
|
|||
'-o', 'UserKnownHostsFile=/dev/null',
|
||||
'-o', 'ConnectTimeout=5',
|
||||
`root@${host}`,
|
||||
'sh', '-c', command,
|
||||
command,
|
||||
], { shell: false })
|
||||
let stdout = '', stderr = ''
|
||||
child.stdout?.on('data', d => { stdout += d })
|
||||
|
|
@ -208,7 +208,7 @@ async function runRemote(target, repoName, cmd, label) {
|
|||
'-o', 'StrictHostKeyChecking=no',
|
||||
'-o', 'UserKnownHostsFile=/dev/null',
|
||||
`root@${target.host}`,
|
||||
'sh', '-c', cmd,
|
||||
cmd,
|
||||
], { timeout: 300_000 })
|
||||
entry.status = 'success'
|
||||
entry.output = stdout.slice(-500)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue