Skip to content

Commit

Permalink
Improve error message when egg-link does not match installed location
Browse files Browse the repository at this point in the history
Include the locations of the mismatched locations in the message, to
provide more context.
  • Loading branch information
matpdegroote2 authored and pradyunsg committed Oct 22, 2021
1 parent 98d9fdf commit 4272ed9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pip/_internal/req/req_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,9 @@ def from_dist(cls, dist: Distribution) -> "UninstallPathSet":
link_pointer = os.path.normcase(fh.readline().strip())
assert (
link_pointer == dist.location
), "Egg-link {} does not match installed location of {} (at {})".format(
link_pointer, dist.project_name, dist.location
), "Egg-link located at {} and pointing to {} does not match "\
"installed location of {} at {}".format(
develop_egg_link, link_pointer, dist.project_name, dist.location
)
paths_to_remove.add(develop_egg_link)
easy_install_pth = os.path.join(
Expand Down

0 comments on commit 4272ed9

Please sign in to comment.