mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-15 07:08:49 +00:00
10 lines
378 B
Python
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)
|