#682: Unify work with output in classic and instant mode

This commit is contained in:
Vladimir Iakovlev
2017-08-31 17:58:56 +02:00
parent 96843fc6cd
commit 4625d8503d
237 changed files with 1322 additions and 1332 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ regex = re.compile(r'error Command "(.*)" not found.')
@for_app('yarn')
def match(command):
return regex.findall(command.stderr)
return regex.findall(command.output)
npm_commands = {'require': 'add'}
@@ -29,7 +29,7 @@ def _get_all_tasks():
def get_new_command(command):
misspelled_task = regex.findall(command.stderr)[0]
misspelled_task = regex.findall(command.output)[0]
if misspelled_task in npm_commands:
yarn_command = npm_commands[misspelled_task]
return replace_argument(command.script, misspelled_task, yarn_command)