mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
fix(xpip): never add sudo
, append --user
instead (#4879)
This commit is contained in:
parent
c8c1fd1071
commit
649fad8a7c
2 changed files with 25 additions and 1 deletions
24
news/xpip_perms.rst
Normal file
24
news/xpip_perms.rst
Normal file
|
@ -0,0 +1,24 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Security:**
|
||||
|
||||
* ``xpip`` will never add ``sudo`` under any circumstances and will instead append ``--user`` as needed
|
||||
|
|
@ -815,7 +815,7 @@ def detect_xpip_alias():
|
|||
# XXX: Does windows have an installation mode that requires UAC?
|
||||
return basecmd
|
||||
elif not os.access(os.path.dirname(sys.executable), os.W_OK):
|
||||
return ["sudo"] + basecmd
|
||||
return basecmd.extend(["--user"])
|
||||
else:
|
||||
return basecmd
|
||||
except Exception:
|
||||
|
|
Loading…
Add table
Reference in a new issue