From 6f89e7c69248db6933271d9ffd4fe28a1a67429b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 23 Jan 2017 18:42:41 -0500 Subject: [PATCH] the command was not found --- pipenv/cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 4e27abd5..70a53452 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -320,6 +320,9 @@ def format_help(help): help = help.replace(' shell', str(crayons.blue(' shell', bold=True))) help = help.replace(' update', str(crayons.yellow(' update'))) + help = help.replace('# Commands:', str(crayons.yellow(' update'))) + + return help @@ -495,7 +498,11 @@ def run(command, args): ensure_project() # Spawn the new process, and interact with it. - c = pexpect.spawn('{0} {1}'.format(which(command), ' '.join(args))) + try: + c = pexpect.spawn('{0} {1}'.format(which(command), ' '.join(args))) + except pexpect.exceptions.ExceptionPexpect: + click.echo(crayons.red('The command was not found!')) + sys.exit(1) # Interact with the new shell. c.interact()