This commit is contained in:
Andras Bacsai
2022-12-07 14:46:12 +01:00
parent 0dad616c38
commit 132707caa7
2 changed files with 29 additions and 22 deletions

View File

@@ -565,9 +565,9 @@ export async function executeCommand({ command, dockerId = null, sshCommand = fa
}
if (sshCommand) {
if (shell) {
return execaCommand(`ssh ${remoteIpAddress}-remote ${command}`, { shell: true, stdio: 'inherit' });
return execaCommand(`ssh ${remoteIpAddress}-remote ${command}`);
}
return await execa('ssh', [`${remoteIpAddress}-remote`, ...dockerArgs]);
return await execa('ssh', [`${remoteIpAddress}-remote`, dockerCommand, ...dockerArgs]);
}
if (stream) {
return await new Promise(async (resolve, reject) => {