mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 14:48:49 +00:00
apt_list_upgradable: Prepend sudo to suggestion if used in command
This commit is contained in:
parent
83e1710712
commit
5d10c504e1
@ -69,4 +69,7 @@ def test_not_match(command):
|
||||
|
||||
def test_get_new_command():
|
||||
new_command = get_new_command(Command('sudo apt update', match_output))
|
||||
assert new_command == 'sudo apt list --upgradable'
|
||||
|
||||
new_command = get_new_command(Command('apt update', match_output))
|
||||
assert new_command == 'apt list --upgradable'
|
||||
|
@ -11,5 +11,6 @@ def match(command):
|
||||
return "Run 'apt list --upgradable' to see them." in command.output
|
||||
|
||||
|
||||
@sudo_support
|
||||
def get_new_command(command):
|
||||
return 'apt list --upgradable'
|
||||
|
Loading…
x
Reference in New Issue
Block a user