mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-22 09:48:27 +00:00
Handle ssh process exit codes
Change-type: patch
This commit is contained in:
@ -28,7 +28,7 @@ export async function performLocalDeviceSSH(
|
||||
opts: DeviceSSHOpts,
|
||||
): Promise<void> {
|
||||
const reduce = await import('lodash/reduce');
|
||||
const { whichSpawn } = await import('../helpers');
|
||||
const { spawnSshAndExitOnError } = await import('../ssh');
|
||||
const { ExpectedError } = await import('../../errors');
|
||||
const { stripIndent } = await import('common-tags');
|
||||
const { isatty } = await import('tty');
|
||||
@ -107,7 +107,7 @@ export async function performLocalDeviceSSH(
|
||||
command = `${deviceContainerEngineBinary} exec -i ${ttyFlag} ${containerId} ${shellCmd}`;
|
||||
}
|
||||
|
||||
return whichSpawn('ssh', [
|
||||
return spawnSshAndExitOnError([
|
||||
...(opts.verbose ? ['-vvv'] : []),
|
||||
'-t',
|
||||
...['-p', opts.port ? opts.port.toString() : '22222'],
|
||||
|
Reference in New Issue
Block a user