redis-trib: allow support for mandatory options.

This commit is contained in:
antirez
2014-05-12 15:56:16 +02:00
parent 8522f295fa
commit 5fef9b63d2
+8
View File
@@ -1019,6 +1019,14 @@ class RedisTrib
break
end
end
# Enforce mandatory options
ALLOWED_OPTIONS[cmd].each {|option,val|
if !options[option] && val == :required
puts "Option '--#{option}' is required for subcommand '#{cmd}'"
exit 1
end
}
return options,idx
end
end