You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running pip cache commands with sudo print two messages about cache being disabled, one a Warning and other an Error. (The second error message was introduced recently in #8124)
Expected behavior
Ideally only one message should be printed. Or the second message can be supplanted to distinguish the case between using sudo, or using --no-cache-dir (We have options.cache_dir = None in the former, and options.cache_dir = False in the latter
How to Reproduce
Run sudo pip cache <subcommand>
Output
$ sudo pip cache list
WARNING: The directory '/Users/devesh/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
ERROR: pip cache commands can not function since cache is disabled.