mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-21 18:18:38 +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():
|
def test_get_new_command():
|
||||||
new_command = get_new_command(Command('sudo apt update', match_output))
|
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'
|
assert new_command == 'apt list --upgradable'
|
||||||
|
@ -11,5 +11,6 @@ def match(command):
|
|||||||
return "Run 'apt list --upgradable' to see them." in command.output
|
return "Run 'apt list --upgradable' to see them." in command.output
|
||||||
|
|
||||||
|
|
||||||
|
@sudo_support
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
return 'apt list --upgradable'
|
return 'apt list --upgradable'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user