Example #1
0
def test_get_all_matched_commands(stderr, result):
    assert list(get_all_matched_commands(stderr)) == result
Example #2
0
def get_new_command(command, settings):
    broken_cmd = re.findall(r"'([^']*)' is not a task",
                            command.stderr)[0]
    new_cmds = get_all_matched_commands(command.stderr, 'Did you mean this?')
    return replace_command(command, broken_cmd, new_cmds)
def get_new_command(command):
    broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command',
                            command.stderr)[0]
    return replace_command(command, broken_cmd,
                           get_all_matched_commands(command.stderr))
Example #4
0
def test_get_all_matched_commands(stderr, result):
    assert list(get_all_matched_commands(stderr)) == result
Example #5
0
def get_new_command(command, settings):
    broken_cmd = re.findall(r"git: '([^']*)' is not a git command",
                            command.stderr)[0]
    matched = get_all_matched_commands(command.stderr)
    return replace_command(command, broken_cmd, matched)
def get_new_command(command):
    broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command',
                            command.output)[0]
    return replace_command(command, broken_cmd,
                           get_all_matched_commands(command.output))
Example #7
0
def get_new_command(command, settings):
    broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command',
                            command.stderr)[0]
    new_cmd = get_closest(broken_cmd,
                          get_all_matched_commands(command.stderr))
    return replace_argument(command.script, broken_cmd, new_cmd)
Example #8
0
def get_new_command(command):
    broken_cmd = re.findall(r"git: '([^']*)' is not a git command",
                            command.stderr)[0]
    matched = get_all_matched_commands(
        command.stderr, ['The most similar command', 'Did you mean'])
    return replace_command(command, broken_cmd, matched)
Example #9
0
def get_new_command(command, settings):
    broken_cmd = re.findall(r"'([^']*)' is not a task", command.stderr)[0]
    new_cmds = get_all_matched_commands(command.stderr, 'Did you mean this?')
    return replace_command(command, broken_cmd, new_cmds)
Example #10
0
def get_new_command(command):
    broken_cmd = re.findall(r"git: '([^']*)' is not a git command",
                            command.stderr)[0]
    matched = get_all_matched_commands(command.stderr, ['The most similar command', 'Did you mean'])
    return replace_command(command, broken_cmd, matched)
Example #11
0
def get_new_command(command, settings):
    broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command',
                            command.stderr)[0]
    return replace_command(command, broken_cmd,
                           get_all_matched_commands(command.stderr))
Example #12
0
def get_new_command(command):
    broken_cmd = re.findall(r'Error: unknown command "([^"]*)" for "git-lfs"',
                            command.output)[0]
    matched = get_all_matched_commands(command.output,
                                       ['Did you mean', ' for usage.'])
    return replace_command(command, broken_cmd, matched)
def get_new_command(command):
    broken_cmd = re.findall(r"'([^']*)' is not a task", command.output)[0]
    new_cmds = get_all_matched_commands(command.output, "Did you mean this?")
    return replace_command(command, broken_cmd, new_cmds)
Example #14
0
def get_new_command(command, settings):
    broken_cmd = re.findall(r"git: '([^']*)' is not a git command",
                            command.stderr)[0]
    new_cmd = get_closest(broken_cmd,
                          get_all_matched_commands(command.stderr))
    return replace_argument(command.script, broken_cmd, new_cmd)