mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-21 20:38:54 +00:00
#N/A: Update apt_invalid_operation
rule
This commit is contained in:
parent
badd5a2aff
commit
f20e344663
@ -19,7 +19,8 @@ def _parse_apt_operations(help_text_lines):
|
||||
line = line.decode().strip()
|
||||
if is_commands_list and line:
|
||||
yield line.split()[0]
|
||||
elif line.startswith('Basic commands:'):
|
||||
elif line.startswith('Basic commands:') \
|
||||
or line.startswith('Most used commands:'):
|
||||
is_commands_list = True
|
||||
|
||||
|
||||
@ -51,6 +52,6 @@ def _get_operations(app):
|
||||
|
||||
@sudo_support
|
||||
def get_new_command(command):
|
||||
invalid_operation = command.stderr.split()[-1]
|
||||
invalid_operation = command.output.split()[-1]
|
||||
operations = _get_operations(command.script_parts[0])
|
||||
return replace_command(command, invalid_operation, operations)
|
||||
|
Loading…
x
Reference in New Issue
Block a user