njtierney / geotargets

Targets extensions for geospatial data
https://njtierney.github.io/geotargets/
Other
49 stars 4 forks source link

Check if invalid option names are provided in `geotargets_option_get()` #27

Closed njtierney closed 2 months ago

njtierney commented 3 months ago

As stated by @Aariq in #19

...[give] some other method of erroring when an invalid option name is provided

Referring to after this code chunk:

geotargets_option_get <- function(option_name) {
    if (!startsWith(option_name, "geotargets.")) {
        option_name <- paste0("geotargets.", option_name)
    }

# ...

We could do something like:

rlang::arg_match0(option_name, names(geotargets.env)
Aariq commented 2 months ago

I think this is fixed now