dog icon indicating copy to clipboard operation
dog copied to clipboard

Running subshells introduces strange behaviour

Open leemeichin opened this issue 8 years ago • 0 comments

I have many Dog tasks that open new shells (thanks to Docker). Example:

- task: prod-api-sh
  description: Shell into the api container in production
  code: convox exec $(convox ps | grep api | cut -f1 -d' ') sh

The code is pretty much the same as running docker exec -it api_container sh.

This works fine, but the resulting shell behaves strangely. Random control codes are inserted straight after the prompt, and signals go straight to Dog rather than the subshell. This means that hitting Ctrl+C to terminate a command inside the container actually terminates the container itself. Arrow keys don't work, neither do the usual movement shortcuts (Ctrl+A, Ctrl+E), and colours don't work either.

leemeichin avatar Jun 23 '17 13:06 leemeichin