mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Add support for Balena in local ssh
Change-Type: minor
This commit is contained in:
parent
0fd1f04eda
commit
1ef0a1028f
@ -103,7 +103,8 @@ module.exports =
|
|||||||
|
|
||||||
if not options.host
|
if not options.host
|
||||||
shellCmd = '''/bin/sh -c $"'if [ -e /bin/bash ]; then exec /bin/bash; else exec /bin/sh; fi'"'''
|
shellCmd = '''/bin/sh -c $"'if [ -e /bin/bash ]; then exec /bin/bash; else exec /bin/sh; fi'"'''
|
||||||
command += " docker exec -ti #{container} #{shellCmd}"
|
dockerCmd = "'$(if [ -f /usr/bin/balena ]; then echo \"balena\"; else echo \"docker\"; fi)'"
|
||||||
|
command += " #{dockerCmd} exec -ti #{container} #{shellCmd}"
|
||||||
|
|
||||||
subShellCommand = getSubShellCommand(command)
|
subShellCommand = getSubShellCommand(command)
|
||||||
child_process.spawn subShellCommand.program, subShellCommand.args,
|
child_process.spawn subShellCommand.program, subShellCommand.args,
|
||||||
|
Loading…
Reference in New Issue
Block a user