1
0
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:
Joseph Frazier 2018-01-03 10:20:36 -05:00
parent 83e1710712
commit 5d10c504e1
2 changed files with 4 additions and 0 deletions

View File

@ -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'

View File

@ -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'