Commit 5fef9b63 authored by antirez's avatar antirez
Browse files

redis-trib: allow support for mandatory options.

parent 8522f295
...@@ -1019,6 +1019,14 @@ class RedisTrib ...@@ -1019,6 +1019,14 @@ class RedisTrib
break break
end end
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 return options,idx
end end
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment