comments
This commit is contained in:
parent
cd1b304d30
commit
3d113eaec4
2 changed files with 9 additions and 18 deletions
|
|
@ -695,23 +695,14 @@ class DebugSession( object ):
|
|||
return ssh
|
||||
|
||||
def _GetDockerCommand( self, remote ):
|
||||
if 'container' not in remote:
|
||||
raise ValueError( 'Invalid container; must be string' )
|
||||
|
||||
docker = [ 'docker exec' ]
|
||||
docker = [ 'docker', 'exec' ]
|
||||
docker.append( remote[ 'container' ] )
|
||||
return docker
|
||||
|
||||
def _GetRemoteExecCommand( self, remote ):
|
||||
is_ssh_cmd = any(
|
||||
remote.get( 'ssh' ),
|
||||
remote.get( 'account' ),
|
||||
remote.get( 'host' ),
|
||||
)
|
||||
is_docker_cmd = any(
|
||||
remote.get( 'docker' ),
|
||||
remote.get( 'container' ),
|
||||
)
|
||||
is_ssh_cmd = any( key in remote for key in [ 'ssh','host', 'account' ] )
|
||||
is_docker_cmd = 'container' in remote
|
||||
|
||||
if is_ssh_cmd:
|
||||
return self._GetSSHCommand( remote )
|
||||
elif is_docker_cmd:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue