Method: Git::Lib#assert_args_are_not_options
- Defined in:
- lib/git/lib.rb
#assert_args_are_not_options(arg_name, *args)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Validate that the given arguments cannot be mistaken for a command-line option
838 839 840 841 842 843 |
# File 'lib/git/lib.rb', line 838 def (arg_name, *args) invalid_args = args.select { |arg| arg&.start_with?('-') } return unless invalid_args.any? raise ArgumentError, "Invalid #{arg_name}: '#{invalid_args.join("', '")}'" end |