1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-04-20 01:30:55 +01:00
thefuck/thefuck/rules/heroku_multiple_apps.py
Pablo Aguiar e6be00a63b Comply to new flake8 3.6 (#853)
* #N/A: Ignore W504 line break after binary operator

W504 is now part of flake8 current version 3.6

* #N/A: Fix invalid escape sequences

* #N/A: Remove conflicting path before installing gcc with brew
2018-10-30 20:56:55 +01:00

13 lines
331 B
Python

import re
from thefuck.utils import for_app
@for_app('heroku')
def match(command):
return 'https://devcenter.heroku.com/articles/multiple-environments' in command.output
def get_new_command(command):
apps = re.findall('([^ ]*) \\([^)]*\\)', command.output)
return [command.script + ' --app ' + app for app in apps]