redis-trib: allow support for mandatory options.
This commit is contained in:
parent
9b459881c1
commit
630a447449
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user