Describe the bug
The use_{internal,external}_XXX_file() family does not always provide default argument values for name but relies on:
if (missing(name)) {
name <- basename(path)
}
This is fine when this happens at the top level of the function call. However, often there is check_name_length(name)before the if (missing(name))-part which produces an error.
To Reproduce
It's a bit cumbersome to provide a reprex, essentially one generates a new golem and invokes e.g. the use_external_file without a value for the argument name which runs into an error where the check_name_length(name) part gives:
...
argument "name" is missing, with no default
...
Additional context
discovered when working on #1059
can be fixed via 372d3aaef920c0fa50ae6b0e025b82a4968a8fc2
Describe the bug The
use_{internal,external}_XXX_file()
family does not always provide default argument values forname
but relies on:This is fine when this happens at the top level of the function call. However, often there is
check_name_length(name)
before theif (missing(name))
-part which produces an error.To Reproduce It's a bit cumbersome to provide a reprex, essentially one generates a new golem and invokes e.g. the
use_external_file
without a value for the argumentname
which runs into an error where thecheck_name_length(name)
part gives:Additional context