diff --git a/kubernetes/base/config/exec_provider.py b/kubernetes/base/config/exec_provider.py index 3a7ffd2385..08f0af2fb1 100644 --- a/kubernetes/base/config/exec_provider.py +++ b/kubernetes/base/config/exec_provider.py @@ -57,12 +57,11 @@ def __init__(self, exec_config, cwd): self.cwd = cwd or None def run(self, previous_response=None): - is_interactive = sys.stdout.isatty() kubernetes_exec_info = { 'apiVersion': self.api_version, 'kind': 'ExecCredential', 'spec': { - 'interactive': is_interactive + 'interactive': sys.stdout.isatty() } } if previous_response: @@ -71,8 +70,7 @@ def run(self, previous_response=None): process = subprocess.Popen( self.args, stdout=subprocess.PIPE, - stderr=sys.stderr when is_interactive else subprocess.PIPE, - stdin=sys.stdin when is_interactive else None, + stderr=subprocess.PIPE, cwd=self.cwd, env=self.env, universal_newlines=True)