sds/overcommit · error · Overcommit::Exceptions::InvalidCommandArgs
Must specify list of arguments to split on
Error message
Must specify list of arguments to split on
What it means
Error "Must specify list of arguments to split on" thrown in sds/overcommit.
Source
Thrown at lib/overcommit/command_splitter.rb:60
def stdout
stdouts.join
end
# Returns concatenated standard error streams of all invocations in the
# order they were executed.
#
# @return [String]
def stderr
stderrs.join
end
end
class << self
def execute(initial_args, options)
options = options.dup
if (splittable_args = (options.delete(:args) { [] })).empty?
raise Overcommit::Exceptions::InvalidCommandArgs,
'Must specify list of arguments to split on'
end
# Execute each chunk of arguments in serial. We don't parallelize (yet)
# since in theory we want to support parallelization at the hook level
# and not within individual hooks.
results = extract_argument_lists(initial_args, splittable_args).map do |arg_list|
Overcommit::Subprocess.spawn(arg_list, options)
end
Result.new(results.map(&:status), results.map(&:stdout), results.map(&:stderr))
end
private
# Given a list of prefix arguments and suffix arguments that can be split,
# returns a list of argument lists that are executable on the current OS
# without exceeding command line limitations.View on GitHub (pinned to fee0cd74b2)
Solutions
- Provide a non-empty `args` array of splittable arguments (e.g. file paths) when running a command through Overcommit::CommandSplitter (the `args:` option of `execute`).
- If splitting is not needed, call the subprocess directly without the `args:` option instead of going through the splitter.
When it happens
Trigger: Thrown at lib/overcommit/command_splitter.rb:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sds/overcommit@fee0cd74b2 (2026-08-23).
Data as JSON: /api/errors/10e74d5e1e054947.
Report an issue: GitHub.