Skip to content

Commit ad6f18f

Browse files
committed
Fixed a docker/run current directory issue when invoked with a command to run.
- Legacy-Id: 13819
1 parent 900174a commit ad6f18f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docker/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ image=$(docker ps | grep "$REPO:$TAG" | awk '{ print $1 }')
184184
if [ "$image" ]; then
185185
if [ "$*" ]; then
186186
echo "Running 'cd ~/${parent#$HOME/}; $*'"
187-
docker exec -u "$WHO" -t $image bash -c "cd '~/${parent#$HOME/}'; $*"
187+
docker exec -u "$WHO" -t $image bash -i -c "cd; cd \"${parent#$HOME/}\"; $*"
188188
else
189-
docker exec -u "$WHO" -ti $image bash
189+
docker exec -u "$WHO" -ti $image bash -i
190190
fi
191191
else
192192
echo ""

0 commit comments

Comments
 (0)