1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-15 15:18:53 +00:00
2015-04-18 15:16:15 -04:00

10 lines
378 B
Python

def match(command, settings):
return ('permission denied' in command.stderr.lower()
or 'EACCES' in command.stderr
or 'error: you cannot perform this operation unless you are root.' in command.stderr
or 'pkg: Insufficient privileges' in command.stderr)
def get_new_command(command, settings):
return 'sudo {}'.format(command.script)