Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable --tty for subprocess when parent process is non-tty #1306

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ansible_runner/config/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import logging
import os
import re
import sys
import stat
import tempfile
import shutil
Expand Down Expand Up @@ -495,7 +496,7 @@ def wrap_args_for_containerization(self,
new_args = [self.process_isolation_executable]
new_args.extend(['run', '--rm'])

if self.runner_mode == 'pexpect' or getattr(self, 'input_fd', False):
if self.runner_mode == 'pexpect' or self.runner_mode == "subprocess" and sys.stdout.isatty():
xz-dev marked this conversation as resolved.
Show resolved Hide resolved
new_args.extend(['--tty'])

new_args.append('--interactive')
Expand Down
Loading