{"record":{"id":"10e74d5e1e054947","repo":"sds/overcommit","slug":"must-specify-list-of-arguments-to-split-on","errorCode":null,"errorMessage":"Must specify list of arguments to split on","messagePattern":"Must specify list of arguments to split on","errorType":"exception","errorClass":"Overcommit::Exceptions::InvalidCommandArgs","httpStatus":null,"severity":"error","filePath":"lib/overcommit/command_splitter.rb","lineNumber":60,"sourceCode":"      def stdout\n        stdouts.join\n      end\n\n      # Returns concatenated standard error streams of all invocations in the\n      # order they were executed.\n      #\n      # @return [String]\n      def stderr\n        stderrs.join\n      end\n    end\n\n    class << self\n      def execute(initial_args, options)\n        options = options.dup\n\n        if (splittable_args = (options.delete(:args) { [] })).empty?\n          raise Overcommit::Exceptions::InvalidCommandArgs,\n                'Must specify list of arguments to split on'\n        end\n\n        # Execute each chunk of arguments in serial. We don't parallelize (yet)\n        # since in theory we want to support parallelization at the hook level\n        # and not within individual hooks.\n        results = extract_argument_lists(initial_args, splittable_args).map do |arg_list|\n          Overcommit::Subprocess.spawn(arg_list, options)\n        end\n\n        Result.new(results.map(&:status), results.map(&:stdout), results.map(&:stderr))\n      end\n\n      private\n\n      # Given a list of prefix arguments and suffix arguments that can be split,\n      # returns a list of argument lists that are executable on the current OS\n      # without exceeding command line limitations.","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/sds/overcommit/blob/fee0cd74b26eb81f64b43b7fab17bbb541575cc4/lib/overcommit/command_splitter.rb#L42-L78","documentation":"Error \"Must specify list of arguments to split on\" thrown in sds/overcommit.","triggerScenarios":"Thrown at lib/overcommit/command_splitter.rb:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fee0cd74b26eb81f64b43b7fab17bbb541575cc4","analyzedAt":"2026-08-23T04:07:28.153Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}