Skip to content

Commit

Permalink
Remove tty option in exec command
Browse files Browse the repository at this point in the history
Attempt to resolve issue where some of the stream printed to stdout/stderr was
lost.  This change seems to work with `echo "hello world"` as cmd.
  • Loading branch information
dalg24 committed Dec 7, 2016
1 parent f5566a4 commit 0df4cfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/jenkins/docker-run.py
Expand Up @@ -50,8 +50,8 @@
# Execute the commands
for cmd in config['cmd']:
print('[+] ' + cmd)
execute = cli.exec_create(container['Id'], cmd=cmd, stdout=True, stderr=True)
for char in cli.exec_start(execute['Id'], tty=True, stream=True):
execute = cli.exec_create(container['Id'], cmd=cmd, stdout=True, stderr=True, stdin=False)
for char in cli.exec_start(execute['Id'], stream=True):
sys.stdout.write(char.decode(sys.stdout.encoding))
status = cli.exec_inspect(execute['Id'])['ExitCode']
if status != 0:
Expand Down

0 comments on commit 0df4cfb

Please sign in to comment.