Support for hdfs dfs -rm /directory

This commit is contained in:
Michael Lee
2015-08-21 15:48:54 +01:00
parent abbbd1f8eb
commit 42a8b4f639
2 changed files with 19 additions and 5 deletions
+4 -1
View File
@@ -10,4 +10,7 @@ def match(command, settings):
@sudo_support
def get_new_command(command, settings):
return re.sub('^rm (.*)', 'rm -rf \\1', command.script)
arguments = '-rf'
if 'hdfs' in command.script:
arguments = '-r'
return re.sub('\\brm (.*)', 'rm ' + arguments + ' \\1', command.script)