mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-21 10:08:59 +00:00
14 lines
401 B
Python
14 lines
401 B
Python
import re
|
|
from thefuck.utils import sudo_support
|
|
|
|
|
|
def match(command, settings):
|
|
return (('pip' in command.script and 'install' in command.script) and
|
|
'failed with error code 1' in command.stderr and
|
|
('Errno 13' in command.stdout or
|
|
'Permission denied' in command.stdout))
|
|
|
|
|
|
def get_new_command(command, settings):
|
|
return u'sudo {}'.format(command.script)
|