Skip to content

Commit 6ab618d

Browse files
author
Jordan Walsh
committed
Added support for working directory parameter of docker exec
1 parent 8af4f54 commit 6ab618d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/schema/vimspector.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@
186186
"type": "array",
187187
"items": { "type": "string" },
188188
"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."
189193
}
190194
}
191195
}

python3/vimspector/debug_session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,6 +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']])
16871689
docker.append( remote[ 'container' ] )
16881690
return docker
16891691

0 commit comments

Comments
 (0)