1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-20 01:28:56 +00:00

fix small errors to get it to compile with appveyor

This commit is contained in:
braham delam 2019-11-26 22:29:59 -05:00
parent 6227299d07
commit 628bc8dddf

View File

@ -7,12 +7,13 @@ def _get_executable(script_part):
if script_part.startswith(executable): if script_part.startswith(executable):
if executable.startswith("apt"): if executable.startswith("apt"):
if script_part.startswith("apt-get"): if script_part.startswith("apt-get"):
if len(script_part)> len("apt-get"): if len(script_part) > len("apt-get"):
return "apt-get" return "apt-get"
else: else:
return return
return executable return executable
def match(command): def match(command):
return (not command.script_parts[0] in get_all_executables() return (not command.script_parts[0] in get_all_executables()
and _get_executable(command.script_parts[0])) and _get_executable(command.script_parts[0]))
@ -24,11 +25,3 @@ def get_new_command(command):
priority = 4000 priority = 4000