From cf6e780568626d5b86b43a6d12e1c06135595694 Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 26 Jan 2017 15:46:04 +0100 Subject: [PATCH 1/2] fixed calls to pexpect.spawn --- pipenv/cli.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 0b2897f9..3459f014 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -700,9 +700,8 @@ def shell(three=None): terminal_dimensions = get_terminal_size() c = pexpect.spawn( - "{0} -i'".format( - shell - ), + shell, + ["-i"], dimensions=( terminal_dimensions.lines, terminal_dimensions.columns @@ -739,7 +738,7 @@ def run(command, args, three=None): # Spawn the new process, and interact with it. try: - c = pexpect.spawn('{0} {1}'.format(which(command), ' '.join(args))) + c = pexpect.spawn(which(command), args) except pexpect.exceptions.ExceptionPexpect: click.echo(crayons.red('The command was not found within the virtualenv!')) sys.exit(1) From b0563228fd1ab30df08e9f07428308b9c1e12353 Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 26 Jan 2017 16:17:57 +0100 Subject: [PATCH 2/2] click gives us an argument tuple, but we need a list --- pipenv/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 3459f014..40f75ac8 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -738,7 +738,7 @@ def run(command, args, three=None): # Spawn the new process, and interact with it. try: - c = pexpect.spawn(which(command), args) + c = pexpect.spawn(which(command), list(args)) except pexpect.exceptions.ExceptionPexpect: click.echo(crayons.red('The command was not found within the virtualenv!')) sys.exit(1)