From 16eb823066407a4115bb129ac3fce1872c16dc6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=BCegs=20=C4=8Capligins?= Date: Sun, 29 May 2022 22:40:31 +0300 Subject: [PATCH] #1261: Add two more patterns to sudo rule (#1307) * macos shutdown sudo fix * Update tests/rules/test_sudo.py * Update thefuck/rules/sudo.py * Update tests/rules/test_sudo.py * Update thefuck/rules/sudo.py Co-authored-by: Pablo Aguiar --- tests/rules/test_sudo.py | 2 ++ thefuck/rules/sudo.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/rules/test_sudo.py b/tests/rules/test_sudo.py index 60636dde..195bee4f 100644 --- a/tests/rules/test_sudo.py +++ b/tests/rules/test_sudo.py @@ -10,6 +10,8 @@ from thefuck.types import Command 'requested operation requires superuser privilege', 'need to be root', 'need root', + 'shutdown: NOT super-user', + 'Error: This command has to be run with superuser privileges (under the root user on most systems).', 'must be root', 'You don\'t have access to the history DB.', "error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/ipaddr.py'"]) diff --git a/thefuck/rules/sudo.py b/thefuck/rules/sudo.py index a2980216..97aab31f 100644 --- a/thefuck/rules/sudo.py +++ b/thefuck/rules/sudo.py @@ -4,6 +4,8 @@ patterns = ['permission denied', 'you cannot perform this operation unless you are root', 'non-root users cannot', 'operation not permitted', + 'not super-user', + 'superuser privilege', 'root privilege', 'this command has to be run under the root user.', 'this operation requires root.',