Commit 48e21915 by Sébastien Eustace

Avoid calling system pip when pip missing from venv

parent a54e29aa
......@@ -31,19 +31,22 @@ class DebugInfoCommand(Command):
env_python_version = ".".join(str(s) for s in env.version_info[:3])
self.output.title("Virtualenv")
self.output.listing(
[
"<info>Python</info>: <comment>{}</>".format(
env_python_version
),
"<info>Implementation</info>: <comment>{}</>".format(
env.python_implementation
),
"<info>Path</info>: <comment>{}</>".format(
env.path if env.is_venv() else "NA"
),
]
)
listing = [
"<info>Python</info>: <comment>{}</>".format(env_python_version),
"<info>Implementation</info>: <comment>{}</>".format(
env.python_implementation
),
"<info>Path</info>: <comment>{}</>".format(
env.path if env.is_venv() else "NA"
),
]
if env.is_venv():
listing.append(
"<info>Valid</info>: <{tag}>{is_valid}</{tag}>".format(
tag="comment" if env.is_sane() else "error", is_valid=env.is_sane()
)
)
self.output.listing(listing)
self.line("")
......
......@@ -302,8 +302,6 @@ class Env(object):
Return path to the given executable.
"""
bin_path = (self._bin_dir / bin).with_suffix(".exe" if self._is_windows else "")
if not bin_path.exists():
return bin
return str(bin_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment