PMGR: Only add --user flag if not running in a virtual env
This commit is contained in:
parent
2eb80c550f
commit
fdcc6ac367
1 changed files with 1 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ class PipCaller(CommandlineCaller):
|
|||
self._logger.debug("Virtual environment detected, removing --user flag.")
|
||||
arg_list.remove("--user")
|
||||
# otherwise add it if necessary
|
||||
elif (self.use_user or self.force_user) and site.ENABLE_USER_SITE:
|
||||
elif not self._virtual_env and site.ENABLE_USER_SITE and (self.use_user or self.force_user):
|
||||
self._logger.debug("pip needs --user flag for installations.")
|
||||
arg_list.append("--user")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue