示例#1
0
def test_get_all_matched_commands(stderr, result):
    assert list(get_all_matched_commands(stderr)) == result
示例#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))
示例#4
0
def test_get_all_matched_commands(stderr, result):
    assert list(get_all_matched_commands(stderr)) == result
示例#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))
示例#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)
示例#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)
示例#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)
示例#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)
示例#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))
示例#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)
示例#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)