1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-04-20 09:40:46 +01:00
thefuck/thefuck/rules/yarn_command_replaced.py
2017-08-31 17:58:56 +02:00

14 lines
255 B
Python

import re
from thefuck.utils import for_app
regex = re.compile(r'Run "(.*)" instead')
@for_app('yarn', at_least=1)
def match(command):
return regex.findall(command.output)
def get_new_command(command):
return regex.findall(command.output)[0]