add rule for: yarn install [pkg]

--- `install` has been replaced with `add` to add new dependencies. Run $0 instead.

https://github.com/yarnpkg/yarn/blob/6e9a9a6596ca8f177f68f6672a1ef4ff16705336/src/reporters/lang/en.js#L18
This commit is contained in:
Russ Panula
2017-03-25 23:12:01 -07:00
committed by Vladimir Iakovlev
parent d41cbb6810
commit 900e83e028
3 changed files with 46 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
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.stderr)
def get_new_command(command):
return regex.findall(command.stderr)[0]