1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

#1308: Add updatedb (mlocate) pattern to sudo rule

* added updatedb(mlocate) to sudo rules

* Add test

Co-authored-by: phk <phk@terminal21.de>
Co-authored-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
This commit is contained in:
0xphk 2022-06-05 22:58:31 +02:00 committed by GitHub
parent 16eb823066
commit 06cb50b1e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,7 @@ from thefuck.types import Command
'need root',
'shutdown: NOT super-user',
'Error: This command has to be run with superuser privileges (under the root user on most systems).',
'updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db',
'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'"])

View File

@ -24,7 +24,8 @@ patterns = ['permission denied',
'you don\'t have write permissions',
'use `sudo`',
'sudorequirederror',
'error: insufficient privileges']
'error: insufficient privileges',
'updatedb: can not open a temporary file']
def match(command):