mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
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. $ ```
This commit is contained in:
+3
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user