mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
@@ -0,0 +1 @@
|
||||
Improve the error message of ``pipenv --py`` when virtualenv can't be found.
|
||||
@@ -1775,6 +1775,17 @@ def ensure_lockfile(keep_outdated=False, pypi_mirror=None):
|
||||
|
||||
|
||||
def do_py(system=False):
|
||||
if not project.virtualenv_exists:
|
||||
click.echo(
|
||||
"{}({}){}".format(
|
||||
crayons.red("No virtualenv has been created for this project "),
|
||||
crayons.white(project.project_directory, bold=True),
|
||||
crayons.red(" yet!")
|
||||
),
|
||||
err=True,
|
||||
)
|
||||
return
|
||||
|
||||
try:
|
||||
click.echo(which("python", allow_global=system))
|
||||
except AttributeError:
|
||||
|
||||
Reference in New Issue
Block a user