Skip to content

Commit

Permalink
Prevent DistutilsOptionError when prefix is indicated in the global e…
Browse files Browse the repository at this point in the history
…nvironment and --target is used. Fixes pypa#4106.
  • Loading branch information
benoit-pierre authored and jaraco committed Nov 12, 2018
1 parent 6af9de9 commit e6bc873
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pip/_internal/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def distutils_scheme(dist_name, user=False, home=None, root=None,
# ideally, we'd prefer a scheme class that has no side-effects.
assert not (user and prefix), "user={} prefix={}".format(user, prefix)
i.user = user or i.user
if user:
if user or home:
i.prefix = ""
i.prefix = prefix or i.prefix
i.home = home or i.home
Expand Down

0 comments on commit e6bc873

Please sign in to comment.