Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilputhiry committed Jan 29, 2025
1 parent a5c3373 commit 70bed24
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kubernetes/base/config/exec_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ def __init__(self, exec_config, cwd, cluster=None):
else:
self.cluster = None
self.cwd = cwd or None

@property
def shell(self):
# for win32 shell should be True
# for others like linux and darwin shell should be False
# see https://github.com/kubernetes-client/python/pull/2289
return sys.platform == "win32"

def run(self, previous_response=None):
is_interactive = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
Expand All @@ -82,7 +89,7 @@ def run(self, previous_response=None):
cwd=self.cwd,
env=self.env,
universal_newlines=True,
shell=True)
shell=self.shell)
(stdout, stderr) = process.communicate()
exit_code = process.wait()
if exit_code != 0:
Expand Down

0 comments on commit 70bed24

Please sign in to comment.