From 3263e5f091bbfac345581379bd8dbd9a04f39adc Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Mon, 23 Jan 2017 20:59:12 +0530 Subject: [PATCH] Better output for where command when no Pipfile Presently when there is no Pipfile inside a directory, running `pip --where` gives `Pipfile found at None. Considering this to be the project home.`. This seems ambiguous and I've changed it to ``` $ pipenv --where No Pipfile present at project home. Consider running `pipenv install` first to automatically generate a Pipfile for you. $ ``` --- pipenv/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 7985d5b9..da927d31 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -64,7 +64,9 @@ def do_where(virtualenv=False, bare=True): if not virtualenv: location = project.pipfile_location - if not bare: + if not location: + click.echo('No Pipfile present at project home. Consider running {0} first to automatically generate a Pipfile for you.'.format(crayons.green('`pipenv install`'))) + elif not bare: click.echo('Pipfile found at {0}. Considering this to be the project home.'.format(crayons.green(location))) else: click.echo(location)