Commit a5f542b2 by Riccardo Albertazzi Committed by GitHub

fix: fix exception on invalid url dependency for current env (#7953)

parent 277fa607
...@@ -780,9 +780,15 @@ class Executor: ...@@ -780,9 +780,15 @@ class Executor:
strict=False, strict=False,
env=self._env, env=self._env,
) )
# 'archive' can at this point never be None. Since we previously downloaded if archive is None:
# an archive, we now should have something cached that we can use here # Since we previously downloaded an archive, we now should have
assert archive is not None # something cached that we can use here. The only case in which
# archive is None is if the original archive is not valid for the
# current environment.
raise RuntimeError(
f"Package {link.url} cannot be installed in the current environment"
f" {self._env.marker_env}"
)
if archive.suffix != ".whl": if archive.suffix != ".whl":
message = ( message = (
......
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