docopt provides different processing for a single string
than an array/vector. As "string"`` and c("string")`
are semantically equivalent in R, this can create problems
when a single parameter is provided. Thus, this function
wraps docopt to ensure that the args will always be
interpreted as a vector.
precommit_docopt(doc, args = commandArgs(trailingOnly = TRUE), ...)character vector with command line specification.
character vector of command line arguments.
Defaults to commandArgs(trailingOnly=TRUE).
Additional parameters passed to docopt.
This function is only exported for use in hook scripts, but it's not intended to be called by the end-user directly.
Other hook script helpers:
diff_requires_run_roxygenize(),
dirs_R.cache(),
may_require_permanent_cache(),
robust_purl(),
roxygen_assert_additional_dependencies(),
roxygenize_with_cache()