#1047: Fix pip_unknown_command by using a less restrictive regex

Fix #1047
This commit is contained in:
Caplinja
2020-02-29 19:19:38 -06:00
committed by Pablo Aguiar
parent 2ced7a7f33
commit 444908ce1c
2 changed files with 22 additions and 9 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ def match(command):
def get_new_command(command):
broken_cmd = re.findall(r'ERROR: unknown command \"([a-z]+)\"',
broken_cmd = re.findall(r'ERROR: unknown command "([^"]+)"',
command.output)[0]
new_cmd = re.findall(r'maybe you meant \"([a-z]+)\"', command.output)[0]
new_cmd = re.findall(r'maybe you meant "([^"]+)"', command.output)[0]
return replace_argument(command.script, broken_cmd, new_cmd)