Skip to content

Commit f82577b

Browse files
author
Jordan Walsh
committed
refactored docker args from pr feedback
1 parent 6ab618d commit f82577b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/schema/vimspector.schema.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
"type": "string",
114114
"description": "Name or container id of the docker run container to connect to (via docker exec). Note the container must already be running (Vimspector will not start it) and it must have the port forwarded to the host if subsequently connecting via a port (for example <tt>docker run -p 8765:8765 -it simple_python</tt>)."
115115
},
116+
"docker_args": {
117+
"type": "array",
118+
"items": {"type": "string"},
119+
"description": "Extra command line args to pass to docker exec."
120+
},
116121
"ssh": {
117122
"type": "object",
118123
"description": "Optional to customize the ssh client and its arguments to execute for remote-launch or remote-attach.",
@@ -186,10 +191,6 @@
186191
"type": "array",
187192
"items": { "type": "string" },
188193
"description": "A single command to execute for remote-launch. Like runCommands but for a single command."
189-
},
190-
"workdir": {
191-
"type": "string",
192-
"description": "For containers. The value passed to docker exec for the working directory."
193194
}
194195
}
195196
}

python3/vimspector/debug_session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,8 +1684,8 @@ def _GetShellCommand( self ):
16841684

16851685
def _GetDockerCommand( self, remote ):
16861686
docker = [ 'docker', 'exec', '-t' ]
1687-
if 'workdir' in remote:
1688-
docker.extend(["-w", remote['workdir']])
1687+
if 'docker_args' in remote:
1688+
docker += remote['docker_args']
16891689
docker.append( remote[ 'container' ] )
16901690
return docker
16911691

0 commit comments

Comments
 (0)