Files
thefuck/thefuck/rules/brew_update_formula.py
T
Vladimir Iakovlev bab5de236f #710: Fix tests
2017-10-15 16:39:40 +02:00

13 lines
342 B
Python

from thefuck.utils import for_app
@for_app('brew', at_least=2)
def match(command):
return ('update' in command.script
and "Error: This command updates brew itself" in command.output
and "Use 'brew upgrade" in command.output)
def get_new_command(command):
return command.script.replace('update', 'upgrade')