Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5fef9b63
Commit
5fef9b63
authored
May 09, 2014
by
antirez
Browse files
redis-trib: allow support for mandatory options.
parent
8522f295
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
5fef9b63
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment