#43 Add rm_root as disabled by default rule

This commit is contained in:
nvbn
2015-04-22 16:08:54 +02:00
parent 14ef5c7d1c
commit fa4e4522b7
3 changed files with 10 additions and 2 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
enabled_by_default = False
def match(command, settings):
return ('/' in command.script.split()
return ({'rm', '/'}.issubset(command.script.split())
and '--no-preserve-root' not in command.script
and '--no-preserve-root' in command.stderr)