#682: Unify work with output in classic and instant mode
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user