Skip to content

Commit

Permalink
Merge pull request #12361 from meeseeksmachine/auto-backport-of-pr-12…
Browse files Browse the repository at this point in the history
…360-on-7.x

Backport PR #12360 on branch 7.x (use $SHELL in system_piped)
  • Loading branch information
Carreau committed Jun 2, 2020
2 parents fc043b1 + 31133c3 commit 1ea8230
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions IPython/utils/_process_posix.py
Expand Up @@ -59,11 +59,12 @@ class ProcessHandler(object):

@property
def sh(self):
if self._sh is None:
self._sh = pexpect.which('sh')
if self._sh is None:
shell_name = os.environ.get("SHELL", "sh")
self._sh = pexpect.which(shell_name)
if self._sh is None:
raise OSError('"sh" shell not found')
raise OSError('"{}" shell not found'.format(shell_name))

return self._sh

def __init__(self, logfile=None, read_timeout=None, terminate_timeout=None):
Expand Down

0 comments on commit 1ea8230

Please sign in to comment.