Skip to contents

Tests whether or not a certain package configuration value is set. See pkg_config_val() for the underlying concept.

Usage

has_pkg_config_val(
  key,
  pkg = utils::packageName(env = parent.frame()),
  env = parent.frame()
)

Arguments

key

Configuration key name. A character scalar.

pkg

Package name. A character scalar. Defaults to the name of the calling package.

env

Environment to evaluate default_value_dynamic in, if necessary.

Value

A logical scalar.

Details

Note that has_pkg_config_val() throws an error if the package configuration key doesn't exist.

See also

Other package configuration functions: augment_pkg_config(), pkg_config_val(), pkg_config_val_default(), print_pkg_config()

Examples

try(
  pal::has_pkg_config_val(key = "gen_pkgdown_ref",
                          pkg = "pkgpurl")
)
#> [1] TRUE